
Node
jason_cuijiahui
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
nodejs express框架
参考资料:https://www.runoob.com/nodejs/nodejs-express-framework.htmlhttp://www.expressjs.com.cn/https://www.jianshu.com/p/9a30447c32dfhttps://github.com/chyingp/nodejs-learning-guidehttps://github.c...原创 2020-02-06 21:10:08 · 300 阅读 · 0 评论 -
nodejs文件上传样例(express)
代码├── form.html├── node_modules├── package.json├── package-lock.json├── public│ ├── doc│ │ └── README.md│ └── upload│ └── 362131ec347930fab2c4dd9a708048d8└── server.jsform.ht...原创 2020-02-06 20:24:03 · 327 阅读 · 0 评论 -
nodejs操作mysql
参考安装mysql与可视化工具sudo apt-get install mysql-server mysql-clientservice mysql startservice mysql stopservice mysql restartservice mysql statussudo apt-get install mysql-workbenchmysql-workbenc...原创 2020-02-06 19:14:14 · 370 阅读 · 0 评论 -
nodejs restful api样例(express)
参考自REST是设计风格而不是标准。REST通常基于使用HTTP,URI,和XML(标准通用标记语言下的一个子集)以及HTML(标准通用标记语言下的一个应用)这些现有的广泛流行的协议和标准。REST 通常使用 JSON 数据格式。HTTP 方法以下为 REST 基本架构的四个方法:GET - 用于获取数据。PUT - 用于更新或添加数据。DELETE - 用于删除数据。POST -...原创 2020-02-06 12:05:45 · 740 阅读 · 0 评论 -
nodejs多进程exec/spanw/fork
参考Node.js 是以单线程的模式运行的,但它使用的是事件驱动来处理并发,这样有助于我们在多核 cpu 的系统上创建多个子进程,从而提高性能。每个子进程总是带有三个流对象:child.stdin, child.stdout和child.stderr。execexec - child_process.exec 使用子进程执行命令,缓存子进程的输出,并将子进程的输出以回调函数参数的形式一次...原创 2020-02-05 23:17:05 · 1069 阅读 · 0 评论 -
nodejs的get与post
get由于GET请求直接被嵌入在路径中,URL是完整的请求路径,包括了?后面的部分,因此你可以手动解析后面的内容作为GET请求的参数。get.jsvar http = require('http');var url = require('url');var util = require('util');http.createServer(function(req, res) { ...原创 2020-02-05 16:43:42 · 500 阅读 · 0 评论 -
Node.js的模块
函数的形式hello.jsexports.world = function() { console.log('Hello World');}main.jsvar hello = require('./hello');hello.world();类的形式原创 2020-02-05 10:32:54 · 223 阅读 · 0 评论 -
Node一个简单hello world
├── index.js├── router.js└── server.jsindex.jsvar server = require("./server");var router = require("./router");server.start(router.route);router.jsfunction route(pathname) { console.lo...原创 2020-02-05 10:22:24 · 268 阅读 · 0 评论 -
NVM管理Node版本
NVM概要NVM其实用于管理多个版本的Node。没有NVM的情况是:很繁琐地手动安装多个版本的Node很繁琐地让一个project基于一个特定的Node版本安装Linuxsudo apt-get updatesudo apt-get install build-essential下载并运行脚本(注意具体版本)curl -o- https://raw.githubuserco...原创 2020-01-13 15:26:05 · 331 阅读 · 0 评论