yuanzm / microblog Goto Github PK
View Code? Open in Web Editor NEW《nodejs开发指南》微博实例express4.x版
《nodejs开发指南》微博实例express4.x版
被坑了一把.
我启动的时候,是使用bin/www脚本启动的
我猜你是直接node app.js吧?
我悲剧的原因在于,你app.js里写了一句 app.listen(3000);
而bin/www脚本里也有一句 set(port,3000)
导致我启动的时候,一直提示端口被占用.好悲剧~
因为我最初尝试自己从头到尾搭一个工程,然后一直报
Failed to load c++ bson extension, using pure JS version
js-bson: Failed to load c++ bson extension, using pure JS version
用你的项目也有打印这一句,我就被绕进去了
唉
另外,你代码里好多json后面多了个逗号
module.exports = new Db(settings.db, new Server(settings.host, Connection.DEFAULT_PORT, {}), {safe: true});
启动express会报错
Cannot read property 'DEFAULT_PORT' of undefined
需要把 Connection.DEFAULT_PORT 改成 mongodb的默认端口号 20717 就好了。不知道有没有遇到过这样的情况?或者说有什么解决方法,直接写端口号有点生硬...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.