A Web App like Ruby on Rails with Koa2, Webpack and Postgres
MIT License
A Web App like Ruby on Rails with Koa2, Webpack and Postgres.
This project is like Ruby on Rails Project:
├── app
│ ├── assets
│ │ ├── images
│ │ ├── javascripts
│ │ └── stylesheets
│ ├── controllers
│ ├── helpers
│ ├── models
│ ├── routes
│ ├── services
│ ├── views
│ └── index.js
├── config
│ ├── config.js
│ └── webpack
│ ├── base.js
│ ├── development.js
│ └── production.js
├── db
│ └── migrations
├── index.js
├── package.json
├── public
└── test
git clone https://github.com/embbnux/kails.git
yarn
yarn db:migrate
yarn assets_build
yarn start
$ yarn console
> models.User.create({ name: 'test', email: '[email protected]', password: '12345678', passwordConfirmation: '12345678' }).then(function(user) { console.log(user) })
> models.User.findOne({ where: { email: '[email protected]' } }).then(function(user) { console.log(user) })
How to Deploy Kails With Docker
# migrate database
yarn db:migrate
NODE_ENV=test yarn db:migrate
# run for development. it start app and webpack dev server
yarn start
# run the app
yarn app
# run the lint
yarn lint
# run test
yarn test
# deploy
yarn build
yarn assets_compile
NODE_ENV=production npm run db:migrate
yarn pm2
# console
yarn console