Almanac, the calendar service
You can also get info from frontend/package.json
You can also get info from backend/requirements.txt
At root repository, type the following commands
cd frontend
yarn install
yarn start
At root repository, type the following commands
cd frontend
yarn install
yarn test --coverage --watchAll=false
We expect mysql is installed properly (with mysql-client and mysql-server). Please see https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04 if needed.
First, log in to mysql (by inserting password if needed):
mysql -u root -p
In mysql, do followings in mysql (mysql>
):
create database almanac_db;
create user "altroot"@"localhost" identified by "1234qwerasdf";
grant all privileges on * . * to "altroot"@"localhost";
flush privileges;
Now we can use altroot
with password 1234qwerasdf
for mysql. Run backend first to create adequate database (almanac_db
). At root repository,
cd backend
python manage.py migrate
python manage.py runserver
It will not work well, since there are no elements in the database. Do followings (this is not needed for unit test alone) in mysql:
use almanac_db;
insert into almanac_university(id, name, domain) values(1, 'Seoul National University', 'snu.ac.kr');
insert into almanac_department(id, name) values(1, 'Computer Science Engineering');
The above procedure should be done once. Next time, skip above.
Now, at root repository, type the following commands
cd backend
python manage.py migrate
python manage.py runserver
At root repository, type the following commands
cd backend
coverage run --source='.' manage.py test almanac && coverage report