Skip to content

Commit

Permalink
put server.js code into index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsage88 committed Apr 25, 2022
1 parent 9cbe89f commit 132db0a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#213129",
"titleBar.activeBackground": "#2E453A",
"titleBar.activeForeground": "#FAFCFB"
}
}
28 changes: 28 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const gamesRouter = require('./routes/games');
const coversRouter = require('./routes/covers');
const collectionsRouter = require('./routes/collections');



const app = express();
app.use(cors());
// app.use(bod yParser.urlencoded({extended: false}));
app.use(express.json());



app.use('/games', gamesRouter);
app.use('/collections', collectionsRouter);
app.use('/covers', coversRouter);

app.get('/', (req, res)=>{
console.log('we are listening on shit');
})

app.listen(process.env.PORT || 8888, ()=> {
console.log('howdy we are on ' + 8888);
});

0 comments on commit 132db0a

Please sign in to comment.