Skip to content

Commit c60038b

Browse files
authored
Add files via upload
1 parent b080f0a commit c60038b

File tree

5 files changed

+1094
-0
lines changed

5 files changed

+1094
-0
lines changed

.env

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PORT=5001
2+
OPENAI_API_KEY=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

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

index.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const path = require('path');
2+
const express = require('express');
3+
const dotenv = require('dotenv').config();
4+
const port = process.env.PORT || 5001;
5+
6+
const app = express();
7+
8+
app.use(express.json());
9+
app.use(express.urlencoded({ extended: false }));
10+
11+
app.use(express.static(path.join(__dirname, 'public')));
12+
13+
app.use('/openai', require('./routes/openaiRoutes'));
14+
15+
app.listen(port, () => console.log(`Server started on port ${port}`));

0 commit comments

Comments
 (0)