• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

projekt-matara/koa-demo: Simple API build to demonstrate Koa.js

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

projekt-matara/koa-demo

开源软件地址:

https://github.com/projekt-matara/koa-demo

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Koa.js To-Do API Demo

This is intended as a minimalist demonstration of a ToDo API written with Koa.js and Mongoose/MongoDB.

To get started, you will need the following...

  1. Node.js 7.x.x or above.
  2. Yarn though pure npm can work as well.
  3. MongoDB
  4. Nodemon
  5. Optional but greatly helpful - Postman

Once you have all of items listed above, simply follow these directions.

  1. From the terminal, git clone the repository into your directory of choice.
  2. cd in to the project's home directory and enter yarn install.
  3. Once the packages have installed, open up the project from your text editor of choice.
  4. Open app.js.
  5. Inside app.js, look for mongoose.connect on lines 20 and 21.
  6. Inside mongoose.connect, replace '/path/to/your/mongo' with the Mongo database URI of your choice. Save the change.
  7. From the terminal, enter npm start. The app should (hopefully) fire right up.
  8. Open Postman, then import the koa-demo.postman_collection.json file.
  9. You should be able to interact with the API with ease now.
  10. Enjoy!

One last note, I sincerely hope this ToDo API can be of help to anyone trying to gain an understanding of how to build things using Koa. Don't take what I do as the way to work. Anything you see is just a way to get the job done. That said, I hope this can be of some value to you. If something goes wrong, please feel free to let me know and I'll see what I can do.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
wyntau/koa-vhost: vhost for koajs发布时间:2022-07-10
下一篇:
ria-com/school-test-project-day6: Тестовый проект на koa.js发布时间:2022-07-10
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap