【文件属性】:
文件名称:service-template-node:在Node.js中创建MediaWiki服务的模板
文件大小:56KB
文件格式:ZIP
更新时间:2021-05-12 08:09:31
HTML
服务模板节点
在Node.js中创建MediaWiki服务的模板
入门
安装
首先,克隆存储库
git clone https://github.com/wikimedia/service-template-node.git
安装依赖项
cd service-template-node
npm install
您现在可以开始工作了!
检查/修改/配置app.js
通过将文件放置在routes/添加路径(请查看其中的文件作为示例)
您也可以阅读。
运行示例
该模板是一个可以正常使用的示例,因此您可以立即尝试。 要启动托管REST API的服务器,只需运行(在仓库的目录内)
npm start
这将启动在localhost:6927上侦听的HTTP服务器。 您可以查询几种路线(使用浏览器或curl和朋友):
http://localhost:6927/_info/
http
【文件预览】:
service-template-node-master
----.eslintrc.json(540B)
----.gitignore(120B)
----app.js(8KB)
----package.json(2KB)
----.dockerignore(27B)
----.travis.yml(61B)
----config.dev.yaml(3KB)
----LICENSE(11KB)
----static()
--------index.html(71KB)
----README.md(3KB)
----.eslintignore(9B)
----.pipeline()
--------blubber.yaml(899B)
----lib()
--------util.js(9KB)
--------api-util.js(4KB)
--------swagger-ui.js(4KB)
----spec.template.yaml(12KB)
----config.prod.yaml(3KB)
----routes()
--------v1.js(4KB)
--------empty.js.template(586B)
--------info.js(1KB)
--------root.js(1KB)
--------ex.js(3KB)
----test()
--------.eslintrc.json(159B)
--------utils()
--------mocha.opts(26B)
--------features()
----server.js(424B)
----config.yaml(15B)