feat: begin back end
This commit is contained in:
commit
fdcb2bda88
3
back-end/.gitignore
vendored
Normal file
3
back-end/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
package-lock.json
|
||||
dist/
|
22
back-end/package.json
Normal file
22
back-end/package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "back-end",
|
||||
"version": "1.0.0",
|
||||
"main": "dist/app.js",
|
||||
"scripts": {
|
||||
"start": "tsc && node dist/app.js",
|
||||
"build": "tsc",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"devDependencies": {
|
||||
"@types/express": "^5.0.0",
|
||||
"globals": "^15.11.0",
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.21.1"
|
||||
}
|
||||
}
|
11
back-end/src/app.ts
Normal file
11
back-end/src/app.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import express from 'express';
|
||||
const app = express();
|
||||
const port = 3000;
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.send('Hello World!');
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
return console.log(`Express is listening at http://localhost:${port}`);
|
||||
});
|
11
back-end/tsconfig.json
Normal file
11
back-end/tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"target": "es6",
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"lib": ["es2015"]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user