【文件属性】:
文件名称:chat-api:私人聊天的API
文件大小:43KB
文件格式:ZIP
更新时间:2021-02-03 13:33:39
nodejs express eslint mongoose socket-io
聊天API(针对前端)
入门
私人聊天的后端项目,使用NodeJS + Express + Socket.IO + Mongoose编写。
先决条件
$ node --version
v10.9.0
$ NPM --version
v6.4.0
$ MongoDB --version
v4.0.2
怎么跑
Create a database in MongoDB
git clone https://github.com/fernandohenriques/chat-api.git
cd chat-api/
Create a file called .env
Open this file and add this variables:
- PORT -> Port to API
- MONGODB_URI -> A MongoDB URI for database
npm install
npm start
运行测试
皮棉验证
cd chat-api/
npm run lint
建于
作者
Fernando Henriques -
【文件预览】:
chat-api-master
----bin()
--------socket.js(720B)
--------server.js(442B)
----package.json(791B)
----.eslintrc.json(679B)
----package-lock.json(147KB)
----src()
--------models()
--------config()
--------controllers()
--------app.js(446B)
--------helpers()
--------middlewares()
----.gitignore(52B)
----README.md(1KB)
----.editorconfig(166B)