-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dream example not working #1
Comments
When I run it, it will run on a different port for me too, so I updated the references to port 8080 to match. Have you managed to get around this issue since @multivac61 ? |
Unfortunately, no 😞 |
I have my server.js app running in port 5172 and the npm server running in port 5173 at the same time and it worked properly, just had to have both instances running. |
You can choose to move the public files to a public folder and add |
You need to run both |
Hands up bro might be the resquest to openIA change here you can see how to do that. this can be some one of your problems . `import * as dotenv from 'dotenv'; import OpenAI from 'openai'; const configuration = { const openai = new OpenAI(configuration); import express from 'express'; const app = express(); app.post('/dream', async (req, res) => { const aiResponse = await openai.images.generate({ app.listen(8080, () => console.log('make art on http://localhost:8080/dream')); |
Even with the code from sebastian031093, it's not working. |
I am following along the js course and am unable to get the OpenAI example running.
Here are the steps I ran
npm i
to install the packages.env
filenode server.js
and navigating tohttp://localhost:8080/
results in a text sayingCannot GET /
npm run dev
points me over tohttp://localhost:3000/
where I can see the correct HTMLThe text was updated successfully, but these errors were encountered: