modify docker setup

This commit is contained in:
Danny Avila 2023-03-06 15:56:25 -05:00
parent d9930dd2bc
commit 08f59819cf
20 changed files with 146 additions and 25863 deletions

6
api/.env.example Normal file
View file

@ -0,0 +1,6 @@
OPENAI_KEY=
PORT=3080
NODE_ENV=development
MONGO_URI="mongodb://127.0.0.1:27017/chatgpt-client"
CHATGPT_TOKEN=""
BING_TOKEN=""

View file

@ -9,4 +9,6 @@ COPY . /api/
# Make port 3080 available to the world outside this container
EXPOSE 3080
# Run the app when the container launches
CMD ["npm", "start"]
CMD ["npm", "start"]
# docker build -t node-api .

View file

@ -17,11 +17,11 @@ app.get('/', function (req, res) {
res.sendFile(path.join(projectPath, 'public', 'index.html'));
});
app.use('/ask', routes.ask);
app.use('/messages', routes.messages);
app.use('/convos', routes.convos);
app.use('/customGpts', routes.customGpts);
app.use('/prompts', routes.prompts);
app.use('/api/ask', routes.ask);
app.use('/api/messages', routes.messages);
app.use('/api/convos', routes.convos);
app.use('/api/customGpts', routes.customGpts);
app.use('/api/prompts', routes.prompts);
app.listen(port, () => {
console.log(`Server listening at http://localhost:${port}`);