Last active
March 7, 2023 15:05
-
-
Save yostane/c568d7dc2b228cb221b8627a0f2decc7 to your computer and use it in GitHub Desktop.
ts project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const x = 10; | |
| const y = 20; | |
| function add(x: number, y: number): number { | |
| return x + y; | |
| } | |
| console.log(add(x, y)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import express from "express"; | |
| const app = express(); | |
| app.get("/", (req, res) => res.send("Hello")); | |
| app.listen(3000, () => console.log("Serveur démarré")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "nodemon_ts", | |
| "version": "1.0.0", | |
| "description": "TS + express project", | |
| "scripts": { | |
| "start": "nodemon --watch src -e ts --exec ts-node src/main.ts", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "express": "^4.18.2", | |
| "ts-node": "^10.9.1" | |
| }, | |
| "devDependencies": { | |
| "@types/express": "^4.17.17", | |
| "nodemon": "^2.0.21" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment