瀏覽代碼

Setup Express backend

Benoît Hubert 6 年之前
父節點
當前提交
5cd9b613a2
共有 4 個文件被更改,包括 3213 次插入0 次删除
  1. 5 0
      back/.babelrc
  2. 6 0
      back/index.js
  3. 24 0
      back/package.json
  4. 3178 0
      back/yarn.lock

+ 5 - 0
back/.babelrc

@@ -0,0 +1,5 @@
+{
+  "presets": [
+    "@babel/preset-env"
+  ]
+}

+ 6 - 0
back/index.js

@@ -0,0 +1,6 @@
+import express from 'express';
+import bodyParser from 'body-parser';
+
+const app = express();
+
+app.listen(5000);

+ 24 - 0
back/package.json

@@ -0,0 +1,24 @@
+{
+  "name": "back",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1",
+    "start": "nodemon --exec babel-node index.js"
+  },
+  "keywords": [],
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "body-parser": "^1.19.0",
+    "express": "^4.17.1"
+  },
+  "devDependencies": {
+    "@babel/cli": "^7.5.5",
+    "@babel/core": "^7.5.5",
+    "@babel/node": "^7.5.5",
+    "@babel/preset-env": "^7.5.5",
+    "nodemon": "^1.19.1"
+  }
+}

File diff suppressed because it is too large
+ 3178 - 0
back/yarn.lock