update server.js
This commit is contained in:
parent
02c80ac9fd
commit
1a2591e005
1 changed files with 22 additions and 0 deletions
22
server.js
22
server.js
|
@ -0,0 +1,22 @@
|
|||
const express = require('express');
|
||||
const path = require('path');
|
||||
const dotenv = require('dotenv');
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
const PORT = 3000; //TODO DO NOT HARDCODE THIS
|
||||
|
||||
// Middleware
|
||||
app.use(express.static(path.join(__dirname, 'public')));
|
||||
app.use(express.json());
|
||||
|
||||
|
||||
// Routes
|
||||
// const generateRoute = require('./routes/generate');
|
||||
// app.use('/generate', generateRoute);
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server running on http://localhost:${PORT}`);
|
||||
});
|
||||
|
Loading…
Reference in a new issue