catamphetamine / webapp-db

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install

git clone git@github.com:catamphetamine/webapp-db.git
cd webapp-db
npm install

Install MySQL and a GUI for it (for example, HeidiSQL).

Create webapp-test database and user webapp with no password.

Create configuration.json file (it is excluded from the repo because it contains passwords):

{
	"test": {
		"username": "webapp",
		"database": "webapp-test",
		"dialect": "mysql",
		"logging": false
	},
	"development": {
		"host": "...",
		"port": "...",
		"username": "...",
		"password": "...",
		"dialect": "mysql",
		"database": "webapp-dev",
		"logging": false
	},
	"production": {
		// Production database config.
	}
}

Test:

npm test

Seed

Create a new webapp-dev database in MySQL.

Then initialize it by creating the tables:

npm run dev:db:init

Then "seed" the database with some demo data:

npm run dev:db:seed

About


Languages

Language:JavaScript 100.0%