SeungJun Baek

Surver setup#2 with babel and nodemon 2022/5/15

...@@ -7,3 +7,4 @@ ...@@ -7,3 +7,4 @@
7 사용 API: https://yts.torrentbay.to/api 7 사용 API: https://yts.torrentbay.to/api
8 8
9 사용 데이터베이스(예비) mongo DB 9 사용 데이터베이스(예비) mongo DB
10 +
......
1 +{
2 + "presets": ["@babel/preset-env"]
3 +}
...\ No newline at end of file ...\ No newline at end of file
1 +{
2 + "exec":"npx babel-node server.js"
3 +}
4 +
This diff could not be displayed because it is too large.
...@@ -4,11 +4,18 @@ ...@@ -4,11 +4,18 @@
4 "description": "nodejs project for OS", 4 "description": "nodejs project for OS",
5 "main": "index.js", 5 "main": "index.js",
6 "scripts": { 6 "scripts": {
7 - "start": "echo \"Error: no test specified\" && exit 1" 7 + "start": "nodemon"
8 }, 8 },
9 "author": "", 9 "author": "",
10 "license": "ISC", 10 "license": "ISC",
11 + "devDependencies": {
12 + "@babel/core": "^7.17.10",
13 + "@babel/node": "^7.17.10",
14 + "@babel/preset-env": "^7.17.10",
15 + "nodemon": "^2.0.16"
16 + },
11 "dependencies": { 17 "dependencies": {
18 + "babel-loader": "^8.2.5",
12 "express": "^4.18.1" 19 "express": "^4.18.1"
13 } 20 }
14 } 21 }
......
1 +import express from "express"
2 +
3 +const app = express();
4 +
5 +const PORT = 3000
6 +
7 +app.listen(PORT,() => console.log(`The Server is running on http://localhost:${PORT} 🚀`))
...\ No newline at end of file ...\ No newline at end of file