mirror of
https://github.com/alwxkxk/soft-and-hard.git
synced 2025-01-28 06:32:54 +08:00
fix: 修复路径问题。
This commit is contained in:
parent
0722f1c384
commit
8bcc9516b9
@ -1,12 +1,12 @@
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
var tcpServer = require('../bin/tcp-server.js');
|
||||
|
||||
var path = require ('path');
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', function(req, res, next) {
|
||||
// 默认是使用pug模板的,为了减少不必要的学习与降低入门门槛,改使用html。
|
||||
res.sendFile('index.html',{root:"views"});
|
||||
res.sendFile('index.html',{root:path.join(__dirname , '../views')});
|
||||
});
|
||||
|
||||
// POST / 控制设备开关灯
|
||||
|
@ -1,13 +1,15 @@
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
let mongodb = require('../bin/mongodb');
|
||||
let tcpServer = require('../bin/tcp-server.js');
|
||||
const mongodb = require('../bin/mongodb');
|
||||
const tcpServer = require('../bin/tcp-server.js');
|
||||
const path = require ('path');
|
||||
const moment = require('moment')
|
||||
|
||||
|
||||
// 默认显示 id为123456的设备
|
||||
router.get('/', function(req, res, next) {
|
||||
// 默认是使用pug模板的,为了减少不必要的学习与降低入门门槛,改使用html。
|
||||
res.sendFile('index.html',{root:"views"});
|
||||
res.sendFile('index.html',{root:path.join(__dirname , '../views')});
|
||||
// res.render('index', { title: '智慧宿舍-123456' });
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user