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

fadedDexofan/koa-typeorm-starter: Starter project for using koa with TS and Type ...

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

开源软件名称:

fadedDexofan/koa-typeorm-starter

开源软件地址:

https://github.com/fadedDexofan/koa-typeorm-starter

开源编程语言:

TypeScript 98.2%

开源软件介绍:

Build Status GitHub issues Codacy Badge GitHub license

koa-typeorm-starter

Starter project for using koa with TypeScript and TypeORM

Prerequisites

  • Node 10 or higher (you can try to manage your versions using nvm)
  • Yarn package manager or you need to generate package-lock.json by yourself

Installing

  • Set up your database and make sure you change the config to your own setup. You can find your database config under config/ormconfig.json for your development environment. Change accordingly to your chosen environment (development/test/production)

    {
      "type": "postgres",
      "host": "localhost",
      "port": 5432,
      "username": "username",
      "password": "password",
      "database": "database",
      "logging": false
    }
    

    For more info like supported database driver visit TypeORM.

  • And start your application by running this in the terminal. This would watch for changes and rebuild(transpiled) your application

    $ npm run debug
    

    With that, you can see in your terminal and logs that the app is ready to listen for requests. For example:

    [2018-06-04T01:55:18.426Z] [info]: Server started at http://localhost:3000 NODE_ENV=development
    

    For run in production run this in terminal:

    $ npm run start
    

    If you want to use pm2 check it's config in ecosystem.config.json and the run:

    $ npm run pm2
    

Also if you run on production don't forget to check logs in dirname/logs to make sure that the startup is successful

Running the tests

To run the test suites, type in your terminal

$ npm run test

Or per test type

$ npm run e2e:test
$ npm run unit:test

Built With

Contributing

Open for pull requests!

Authors

Big thanks to JM Santos for similar Express starter




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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