Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davorbadrov/koa-boilerplate
A basic Koa Sequelize boilerplate
https://github.com/davorbadrov/koa-boilerplate
Last synced: about 2 months ago
JSON representation
A basic Koa Sequelize boilerplate
- Host: GitHub
- URL: https://github.com/davorbadrov/koa-boilerplate
- Owner: davorbadrov
- Created: 2016-02-10T12:17:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-10T12:18:14.000Z (almost 9 years ago)
- Last Synced: 2024-10-17T13:14:01.172Z (2 months ago)
- Language: JavaScript
- Size: 2.29 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Basic Koa Sequelize boilerplate (WIP)
This is a basic boilerplate project containing which includes Koa framework and Sequelize ORM. It is still a work in progress and is subject to heavy change.
## Directory structure
```bash
boilerplate
├── config
│ ├── default.yaml # common config for all environments (this is present by default)
│ ├── development.json # config for development environments (not created and is ignored by git)
│ ├── production.json # config for production environments (not created and is ignored by git)
├── controllers
│ ├── index.js # file that requires all controllers and exposes a router array
│ └── users.js # example of a controller, you can use it as a starting point.
├── migrations # migrations directory with an example migration. generated with "sequelize-cli"
│ └── 20141021121205-create-user.js
├── models
│ ├── index.js # generated with "sequelize init". requires all models.
│ └── user.js # an example model. generated with "sequelize-cli model:create"
├── package.json
├── plugins
│ └── index.js # register plugins. add your custom plugins in this folder as well.
├── README.md
└── index.js
```
```bash
boilerplate
├── README.md
├── config
│ ├── default.yaml # common config for all environments (this is present by default, you can additionaly create development.yaml, production.yaml etc.)
├── controllers
│ ├── index.js # file that requires all controllers and exposes a router array
│ └── user.js
├── index.js # entry point of the app
├── models
│ ├── index.js # file that requires all the models and exposes a db object
│ └── user.json # example of a model
├── nodemon.json # nodemon configuration
├── package.json
├── public
│ └── index.html # basic html template
└── utils
└── reader.js # helper for reading directories
```
## Todo
- add basic authentication
- solve logging
- write tests
- write more models/controllers
- write a basic seed/migrate file, remove the forcefull sync inside *models/index.js*
- ...