This web application uses the following technologies:
Before starting, make sure you have working versions of Node (10.0.0+) and mySQL (5.7.23+). If not, please refer to the Wiki for installation details.
node --version
mysql --version
Necessary dependencies must be installed for both parts of the application. For the back-end, execute:
cd anansiBE/
npm install
For the front-end, execute:
cd anansiUi/
npm install
Create a config file inside anansiBE/
called .env
with the following contents, replacing <password>
with a password of your choice:
MYSQL_PASSWORD="<password>"
SECRETKEY="<secret key>"
DATABASE_NAME="anansi_db"
TEST_DATABASE="anansi_db_test"
From the MySQL shell, and enter the following SQL statements, replacing <password>
with the selected password above:
CREATE USER 'dbuser'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON `anansi_db%`.* TO 'dbuser'@'localhost';
FLUSH PRIVILEGES;
To create the database and apply migrations, run the following commands:
#dev database
npm run migrate db:create anansi_db -- -e creation
npm run migrate up
#test database
npm run migrate db:create anansi_db_test
npm run test_migrate up
The first hardcoded administrator user is already included the migrations.
username | password |
---|---|
tester | test |
To start the back-end server, use the following command from anansiBE/
:
npm start
To start the front-end server, use the following command from anansiUI/
:
npm start
The application will then be accessible at port 8080
exposed locally, i.e. http://localhost:8080
.
Note that both servers must be running as separate processes for the application to function.