Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bvalosek/datstack
Hyper-portable and lean Javascript web application boilerplate
https://github.com/bvalosek/datstack
Last synced: 10 days ago
JSON representation
Hyper-portable and lean Javascript web application boilerplate
- Host: GitHub
- URL: https://github.com/bvalosek/datstack
- Owner: bvalosek
- Created: 2014-05-20T21:13:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-23T07:15:52.000Z (over 10 years ago)
- Last Synced: 2024-04-29T21:10:31.067Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 271 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# datstack
Hyper portable and lean Javascript web application boilerplate.
> dat stack tho
## Requirements
* NodeJS
## Features
* Automated unit testing
* Code-based database migrations for MySQL, PostgreSQL, and sqlite3
* Frontend app built with Browserify, Grunt, and Bower
* Share code between the server and client
* Works out of the box for Heroku## Awesome
Install dependencies (and implicitly run `build` and `migrate`):
```
$ npm install
```Build the client application (check out `Gruntfile.js` for options):
```
$ npm run build
```Run database migrations (if there are any, run via
[db-migrate](https://github.com/kunklejr/node-db-migrate)):```
$ npm run migrate
```Run tests (if there are any, run via [tape](https://github.com/substack/tape)):
```
$ npm test
```Start the server app:
```
$ npm start
```## Project Structure
* `app/client/main.js` Client application
* `app/server/main.js` Server application
* `database.json` Database credentials
* `dist/client/` Compiled output directory for client app
* `public/` Web root
* `style/style.less` Style sheet base
* `test/*.js` Unit tests## Database
Migrations are handled via
[db-migrate](https://github.com/kunklejr/node-db-migrate), which has support
for PostgreSQL, MySQL, and sqlite3. The `migrate` script is only run if there
is a `database.json` present in the root of the repo.**Protip**: Create a `./database.json` file to ensure the database
credentials are correct (see the db-migrate docs for format details).It's probably a good idea to source this file in the server code so database
credentials comes from one place.## Heroku
When pushing to a Heroku remote, the client application will automatically be
built and all database migrations will be run.### Example
Using the [heroku-toolbelt](https://toolbelt.heroku.com) from the command line:
```
$ git clone https://github.com/bvalosek/datstack.git
$ cd datstack
$ heroku create
$ git push heroku master
$ heroku open
```