프로젝트
GitHub에서 보기
embbnux/kails
소개
Koa2, Webpack, Postgres를 사용해 Ruby on Rails와 같은 웹 앱을 구축
웹 및 앱 개발What you can do
- Post article with markdown editor
- Hacker news middle layer
측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalKails
A Web App like Ruby on Rails with Koa2, Webpack and Postgres.
This project is like Ruby on Rails Project:
- MVC
- Database (postgres), ORM(sequelize)
- migration(sequelize-cli)
- assets compile(webpack)
- Session
- Password with bcrypt
- Testing (mocha)
- Lint (eslint)
- middlewares
- console
- server side render with react
- flash message
Requirements
- node >= 14.0.0
- yarn
Features
- User system
- Post article with markdown editor
- Hacker news middle layer
Structure
├── 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
Build development environment on localhost
- install nodejs
- install redis and postgres
- create postgres database: for development { database: 'kails_dev', owner: 'kails_dev', password: 'kails_dev' } for test { database: 'kails_test', owner: 'kails_tester', password: 'kails_tester' }
- clone and start this project
git clone https://github.com/embbnux/kails.git
yarn
yarn db:migrate
yarn assets_build
yarn start
- Visit http://localhost:3000/
- console
$ 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) })
Deploy on production
How to Deploy Kails With Docker
Commands with yarn
# 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
Author
Blog
License
관련 프로젝트 살펴보기
불러오는 중…