theodore:http框架

时间:2021-05-11 21:42:25
【文件属性】:
文件名称:theodore:http框架
文件大小:82KB
文件格式:ZIP
更新时间:2021-05-11 21:42:25
framework http-server JavaScript 西奥多 超快速的http框架 安装 npm i theodore 用 const Theodore = require ( 'theodore' ) const app = new Theodore ( ) app . get ( '/' , ( req , res , params ) => res . send ( 'hello world' , 200 ) ) app . get ( '/status' , ( req , res , params ) => res . send ( 'OK' , 200 ) ) app . get ( '/cats' , ( req , res , params ) => res . json ( [ 'theodore' , 'sally' , 'glory' ] , 200 ) ) app . listen ( ) 如何? theodore
【文件预览】:
theodore-master
----.npmignore(87B)
----examples()
--------index.js(518B)
----CONTRIBUTING.md(21KB)
----.travis.yml(35B)
----LICENSE(1KB)
----test()
--------index.js(3KB)
----README.md(2KB)
----CODE_OF_CONDUCT.md(10KB)
----.gitignore(884B)
----index.js(3KB)
----CHANGELOG.md(2KB)
----package-lock.json(263KB)
----package.json(1KB)

网友评论