Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/safrmo/bare-bones-backend
A bare-bones ES6 app backend, using Knex, Bookshelf, Babel, SQLite, and more
https://github.com/safrmo/bare-bones-backend
Last synced: 6 days ago
JSON representation
A bare-bones ES6 app backend, using Knex, Bookshelf, Babel, SQLite, and more
- Host: GitHub
- URL: https://github.com/safrmo/bare-bones-backend
- Owner: SaFrMo
- Created: 2017-01-26T20:38:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T13:24:44.000Z (almost 8 years ago)
- Last Synced: 2024-10-11T05:11:10.343Z (about 1 month ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### What
bare-bones-backend is a simple way to get up and running writing a Node app in ES6 with Knex, Bookshelf, and SQLite 3.### How
#### Initial Setup
1. `npm install`
1. `npm run reset` (seeds with sample data)
1. `npm start` (starts server on localhost:3000)#### Creating Database Schema
1. Run `knex migrate:make YOUR-DATABASE-NAME`. The resulting migration file will appear in `data/migrations`.
1. Follow the instructions at the [docs](http://knexjs.org/#Schema) or [here](http://www.dancorman.com/knex-your-sql-best-friend/) (under the 'Using Migrations' heading) to define your schema.
1. (Optional) Seed your data. See [here](http://knexjs.org/#Seeds-CLI) for more details.
1. From there, you can define computed values and models/collections as they appear in code using [Bookshelf.js](http://bookshelfjs.org/index.html#).#### Testing
1. Create standard [Mocha](https://mochajs.org/) / [Chai](http://chaijs.com/) tests in any file that ends with `_test.js`.
1. `npm run test`.