This application is developed with NodeJs and MYSQL where express and sequelize are used respectively to aid development. There are 4 API routes defined which demostrates the interactions between the server and database. The APIs only provide the Create, Read and Update functionalities.
Refer to the setup guide here to install the necessary software tools.
These changes apply to /server/config/development.js which can be found here.
Set yout preferred IP address and port number for the server.
domain_name: "http://localhost:3000",
HOSTNAME: '127.0.0.1',
PORT: 3000,
Set your MYSQL DB connection parameters.
MYSQL_USERNAME: 'root', // Enter your MYSQL DB username
MYSQL_PASSWORD: 'password', // Enter your MYSQL DB password
MYSQL_HOSTNAME: 'localhost', // Enter your MYSQL DB hostname
MYSQL_DATABASE: 'school', // Enter your MYSQL DB database
MYSQL_PORT: 3306, // Enter your MYSQL DB port number
To enable MYSQL statement logging.
MYSQL_LOGGING: true,
To drop and create the necessary tables.
INIT: true,
To create pseudo table records.
SEED: true,
Install the necessary NPM packages
$ npm i
Start the application
$ npm run start:dev
Ensure that the SEED has been loaded before running the unit tests.
To execute unit tests.
$ npm test
For more information on generating additional test cases, click here.