Skip to content

Commit

Permalink
🔧 Set up dotenv for environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hidragos committed Mar 22, 2023
1 parent e5a33c7 commit 891c967
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
require('dotenv').config();
const express = require('express');

const app = express();
const port = 3500;

// Simple hello world get request
app.get('/hello', (req, res) => {
res.send('Hello World!');
const openai = process.env.OPENAI_API_KEY;
res.send(`key`+ openai);
});


// Start the server
app.listen(port, () => {
console.log(`Example app listening at http:https://localhost:${port}`);
console.log(`Example app listening at http:https://localhost:${port}`);
});

0 comments on commit 891c967

Please sign in to comment.