Showing
3 changed files
with
14 additions
and
4 deletions
1 | -var express = require('express'); | 1 | +let express = require('express'); |
2 | -var app = express(); | 2 | +let app = express(); |
3 | -var bodyParser = require('body-parser'); | 3 | +let bodyParser = require('body-parser'); |
4 | +let routes = require('./routes'); | ||
4 | 5 | ||
5 | app.use(bodyParser.urlencoded({ extended: false })); | 6 | app.use(bodyParser.urlencoded({ extended: false })); |
6 | app.use(bodyParser.json()); | 7 | app.use(bodyParser.json()); |
7 | 8 | ||
8 | -var server = app.listen(80); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
9 | +app.get('/api/home', routes.home); | ||
10 | + | ||
11 | +let server = app.listen(80); | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
app/node/routes/home.js
0 → 100644
app/node/routes/index.js
0 → 100644
-
Please register or login to post a comment