UNPKG

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