app.js 538 B

1234567891011121314151617181920212223242526272829303132333435
  1. var express = require('express');
  2. var app = express();
  3. var router = express.Router();
  4. //引入工具类
  5. var logHelper = require("./helper/LjLogHelper.js");
  6. //根据不同的功能划分模块
  7. app.use('/lesson', require('./router/lesson'))
  8. app.get('/', function (req, res) {
  9. res.sendFile(__dirname+'/index.html',
  10. {
  11. });
  12. })
  13. //启动监听
  14. app.listen(9191, function ()
  15. {
  16. logHelper.info("winBoxNode starting success");
  17. });
  18. process.on('uncaughtException', function (err)
  19. {
  20. logHelper.error(err);
  21. });