✨ Add express backend server
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"commonjs": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import express from "express";
|
||||||
|
const app = express();
|
||||||
|
const port = process.send.PORT || 3000;
|
||||||
|
|
||||||
|
app.get("/", (req, res) => {
|
||||||
|
res.send("Hello World!");
|
||||||
|
});
|
||||||
|
|
||||||
|
app.listen(port, () => {
|
||||||
|
console.log(`Server listening on http://localhost:${port}`);
|
||||||
|
});
|
||||||
Generated
+1018
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "timetable-server",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "minie4",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.18.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user