1 |
|
2 | var express = require('express');
|
3 | var path = require('path');
|
4 | var app = express();
|
5 | var dir = path.join(__dirname, '');
|
6 | app.use('/', express.static(dir));
|
7 | app.get("/", function(req, res) {
|
8 | res.redirect('/web/R.html');
|
9 | });
|
10 |
|
11 | var port = 3000;
|
12 | app.listen(port);
|
13 | console.log('Server started: http://localhost:'+port);
|
14 | console.log('__dirname=', __dirname, " dir=", dir); |
\ | No newline at end of file |