This api powers the core of Fanapptic's service.
Before install, download and install Node.js. The latest stable version of Node.js is recommended.
Before install, download and install MySQL for OSX.
npm install
Before running the api, you'll need to start MySQL on your machine (Port 3306, which is MySQL's default).
After starting, use your favorite tool for manipulating MySQL databases. Popular tools include MySQL Shell, PHPMyAdmin or MySQL Workbench.
Create a new database called fanapptic
. It should have the root
MySQL user assigned to it. The root
user should not have a password. You should use the collation utf8mb4_unicode_ci
.
You may use alternative users, just be sure to change the MYSQL_USERNAME
and MYSQL_PASSWORD
fields in the root level .env
file of the api to match.
The mocha based test suite of the api is setup in a way that it tests the system's integrity while also generating a default dataset within the database.
To run tests, simple use npm test
.
This will generate a default user with the email tester@fanapptic.com
and password testpassword
.
To run the api locally, use npm run dev
.