Giter Site home page Giter Site logo

zhuangbijiang / kails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from embbnux/kails

0.0 2.0 0.0 124 KB

A Web App like Ruby on Rails with Koa2, Webpack and Postgres

Home Page: https://kails.org

License: MIT License

JavaScript 70.63% CSS 10.89% HTML 18.48%

kails's Introduction

Kails

Build Status

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 with redis
  • Password with bcrypt
  • Testing (mocha)
  • Lint (eslint)
  • middleware
  • console
  • server side render with react

Requirements

  • node ^4.0.0
  • npm ^3.0.0

How to Install

 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 this project

Features

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

Usage

npm install
npm run db:migrate
NODE_ENV=test npm run db:migrate
# run for development, it start app and webpack dev server
npm run start
# run the app
npm run app
# run the lint
npm run lint
# run test
npm run test
# deploy
npm run assets_compile
NODE_ENV=production npm run db:migrate
npm run pm2

Go to App console

$ npm run 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) })

Start development environtment

$ npm run start
# Visit `http://localhost:3000/

Deploy on production

How to Deploy Kails

Author

Blog

License

MIT

kails's People

Contributors

embbnux avatar hhebo avatar ecmadao avatar lijianzhang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.