SeungJun Baek

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

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