Basic Routes
This commit is contained in:
18
start.js
18
start.js
@@ -1,15 +1,7 @@
|
||||
//Starts
|
||||
const express = require('express')
|
||||
const { DAL } = require('./src/dal/staticDal')
|
||||
const app = express()
|
||||
const port = 3000
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.json(DAL.getVehicles())
|
||||
|
||||
})
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Example app listening on port ${port}`)
|
||||
})
|
||||
import app from "./app.js";
|
||||
|
||||
const PORT = process.env.PORT || 3000;
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Transit API http://localhost:${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user