Showing
1 changed file
with
18 additions
and
0 deletions
app.js
0 → 100644
| 1 | +var express = require('express'); | ||
| 2 | +var app = express(); | ||
| 3 | +app.post('/', function (req, res) { | ||
| 4 | + res.send('Hello World' + req); | ||
| 5 | +}) | ||
| 6 | +app.get('/test', function (req, res) { | ||
| 7 | + res.send('Hello GET TEST'); | ||
| 8 | +}) | ||
| 9 | +app.post('/test', function (req, res) { | ||
| 10 | + res.send('Hello POST TEST'); | ||
| 11 | +}) | ||
| 12 | + | ||
| 13 | +var server = app.listen(23023, function () { | ||
| 14 | + var host = server.address().address | ||
| 15 | + var port = server.address().port | ||
| 16 | + console.log("Example app listening at http://%s:%s", host, port) | ||
| 17 | +}) | ||
| 18 | + |
-
Please register or login to post a comment