Initial commit
This commit is contained in:
commit
d7af9332c1
1674 changed files with 119641 additions and 0 deletions
17
server.js
Normal file
17
server.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
const express = require('express')
|
||||
const app = express()
|
||||
const port = 3000
|
||||
const bodyparser = require('body-parser')
|
||||
const path = require('path')
|
||||
|
||||
// Middleware
|
||||
const apiRoutes = require('./middleware/api.js')
|
||||
|
||||
// Bodyparser
|
||||
app.use(bodyparser.urlencoded({ extended: true }))
|
||||
app.use(bodyparser.json())
|
||||
|
||||
// Routing
|
||||
app.use('/api', apiRoutes)
|
||||
|
||||
app.listen(port, () => console.log(`Server listening on port ${port}`))
|
Loading…
Add table
Add a link
Reference in a new issue