Monthly Archives: April 2017

整合angular-cli 和 nodejs express

use angular-cli to dev the angular project -> build the project -> copy the html file & js files to the express project folders in nodejs express project, app.js //app.set(‘view engine’, ‘jade’); app.engine(‘html’, require(‘ejs’).renderFile); app.set(‘view engine’, ‘html’); … //app.use(express.static(path.join(__dirname, ‘public’))); … Continue reading

Posted in Nodejs | Leave a comment

VS Code debug warning

Debugging with legacy protocol because Node xxxx v7.9.x was detected. => 在vs code的 launch.json中把 protocol 设成 inspector 即可   see https://github.com/Microsoft/vscode/issues/24764 https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_supported-nodelike-runtimes  

Posted in Nodejs | Leave a comment