liuxing / node-blog Goto Github PK
View Code? Open in Web Editor NEW:rocket:《Node.js从入门到上线》A blog build with Koa2.
License: MIT License
:rocket:《Node.js从入门到上线》A blog build with Koa2.
License: MIT License
2.模块定义
在模块中,上下文提供了exports来到处模块的方法或者变量。它是唯一出口
这里的到处模块不通顺 是告诉模块?
想问下星哥,这个项目是如何构建的呢?docs目录是如何生成的呢?是使用了gitbook么?
在实例里没有看到centos的部署 网上搜了一堆没成功,看着markdown没弄出来能否给出详细部署教程?
配置完 routes/home.js , index.js /index.js 还有 views/index.html 代码和示例是一样的 也没有少做什么步骤 貌似, 服务启动是ok的 但是访问3000就会出现 Internal Server Error
看控制台显示如下
TypeError: ctx.render is not a function
at index (/Users/kaixin1002/WebstormProjects/blog/routes/home.js:3:13)
at dispatch (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
at next (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)
at /Users/kaixin1002/WebstormProjects/blog/node_modules/koa-router/lib/router.js:346:16
at dispatch (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
at /Users/kaixin1002/WebstormProjects/blog/node_modules/koa-router/node_modules/koa-compose/index.js:36:12
at dispatch (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa-router/lib/router.js:351:31)
at dispatch (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa-compose/index.js:42:32)
at /Users/kaixin1002/WebstormProjects/blog/node_modules/koa-compose/index.js:34:12
at Application.handleRequest (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa/lib/application.js:150:12)
at Server.handleRequest (/Users/kaixin1002/WebstormProjects/blog/node_modules/koa/lib/application.js:132:19)
at Server.emit (events.js:182:13)
at parserOnIncoming (_http_server.js:658:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
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.