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

soygul/koan: KOAN (Koa, Angular, Node, Mongo) starter kit for full-stack JavaScr ...

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

开源软件名称:

soygul/koan

开源软件地址:

https://github.com/soygul/koan

开源编程语言:

JavaScript 67.6%

开源软件介绍:

KOAN

Build Status

KOAN Stack is a boilerplate that provides a starting point for full stack JavaScript Web development with Koa, AngularJS, and Node.js along with MongoDB and WebSockets. A summary of tech stack:

  • Client: AngularJS and Bootstrap. Client side is fully static and CDN ready. All client packages are located at client\bower_packages.
  • Server: Koa for RESTful API serving on Node.js. ES6 async/await functions all the way!
  • WebSockets along with JSON-RPC is used for real-time client-server communication and browser sync.
  • OAuth 2 is used for social authentications. Instead of auth cookies, we use JWT along with HTML5 local storage.
  • Grunt tasks are used to facilitate development and testing.
  • MongoDB for persistence.

Live Example

Below are the screenshots from the bundled demo app, which is a Facebook like real-time sharing app. Follow instructions in the next section if you want to play with it locally, or deploy it to Heroku.

Login page:

Login Page

User home page:

Home Page

Getting Started

Make sure that you have Node.js v7.6 or higher (for Node <7.6, use v1.6 release), and MongoDB v2 or higher (running on the default port 27017) installed on your computer. To get started with KOAN stack, do following:

git clone --depth 1 https://github.com/soygul/koan.git
cd koan
npm install
npm start

Your application should run on the 3000 port so in your browser just go to http://localhost:3000. If you want to run tests, simply type:

npm test

Configuration

All configuration is specified in the /server/config directory, particularly the config.js file. Here you can hook up any social app keys if you want integration with Twitter, Facebook, or Google.

Heroku Deployment

Deploy

Procfile and app.json are making this repo readily available for Heroku deployment. You can start by clicking the above button.

Testing

You can run all the tests with npm test. Tests are run with:

  • Client (unit): Jasmine + Karma (Angular default)
  • Client (e2e): Jasmine + Protractor (Angular default)
  • Server: Mocha/SuperTest/Should (Koa default)

See /test/server/users.js for an example.

Credits

Client side is entirely based on the official: Angular Seed. Server side simply utilizes generally accepted Koa middleware and Node.js best practices.

The Name

The project name is an acronym for Koa, Angular, and Node. It also is the name for a Zen Buddhist riddle used to focus the mind during meditation and to develop intuitive thinking.

License

MIT




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
eggjs/egg: 发布时间:2022-06-24
下一篇:
17koa/koa-generator-examples: 一起学koa发布时间:2022-06-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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