- [All] Finished API call for spells and various bug fixes
This commit is contained in:
4
index.js
4
index.js
@@ -2,6 +2,7 @@
|
||||
|
||||
// MODULES
|
||||
const express = require('express')
|
||||
const cors = require('cors')
|
||||
|
||||
const connection = require('./database/connection')
|
||||
const db = connection.db
|
||||
@@ -14,9 +15,10 @@ const routes = require('./routes')
|
||||
|
||||
// Builds app
|
||||
let app = express()
|
||||
app.use(cors())
|
||||
const server = app.listen( port, () => { console.log(`App listening on port ${port}`)} )
|
||||
|
||||
app.use('/spells', routes.spells)
|
||||
app.use('/api/spells', routes.spells)
|
||||
|
||||
// On process kill with SIGINT
|
||||
process.on('SIGINT', () => {
|
||||
|
||||
Reference in New Issue
Block a user