|
@ -1,5 +1,6 @@ |
|
|
const express = require("express"); |
|
|
const express = require("express"); |
|
|
const expressWs = require("express-ws"); |
|
|
const expressWs = require("express-ws"); |
|
|
|
|
|
const cors = require('cors'); |
|
|
|
|
|
|
|
|
const SQLite3Repository = require("./repositories/sqlite3"); |
|
|
const SQLite3Repository = require("./repositories/sqlite3"); |
|
|
|
|
|
|
|
@ -15,6 +16,8 @@ repo.setup().catch(err => { |
|
|
const app = express(); |
|
|
const app = express(); |
|
|
expressWs(app); |
|
|
expressWs(app); |
|
|
|
|
|
|
|
|
|
|
|
app.use(cors()); |
|
|
|
|
|
|
|
|
app.use(express.json({strict: false})); |
|
|
app.use(express.json({strict: false})); |
|
|
|
|
|
|
|
|
app.use("/api/bike/", require("./api/bike")(repo)); |
|
|
app.use("/api/bike/", require("./api/bike")(repo)); |
|
|