local development advice

Install mysql to your machine and run the follow sql

create a local database call 'tiramisu' and add a new user:
CREATE USER 'tiramisu_dev'@'localhost' IDENTIFIED BY 'tiramisu_dev';
CREATE DATABASE IF NOT EXISTS tiramisu CHARSET utf8;
GRANT ALL PRIVILEGES ON tiramisu . * TO 'tiramisu_dev'@'localhost';
FLUSH PRIVILEGES;

copy a one local config to connect to your own machine's mysql database

cp config/dev.js config/local.js

Quick Start

frontend

npm run frontend

backend

to load the test db config

npm run dev

or

to load the dev or test db config

npm run frontend | npm run fe 

update frontend compile js

sudo npm install -g gulp
cd public
npm install
gulp deploy

Run the tests

npm test

writing tests

The test entry file is

test/test.js

you can add a new test file with following format

// newTest.js
module.exports = function () {
  describe(...);
}

then add it to the test.js file

// test.js
require('./newTest');

Deployment

You may need to go to the Aliyun console to load the following files to populate the db

ls ./sql

Then run the following deployment script

./deploy_tiramisu.sh reload