This is the code repository for the WAD2 project. It consists of both a backend Node.js API server as well as a Vue frontend.
Hot module reloading is available for the frontend.
- Install PostgreSQL on your system (Windows - installer, Mac -
brew install postgresql && brew services start postgresql && psql -c "CREATE ROLE postgres LOGIN"
) - Copy
.env.example
to.env
. The default value is suitable for development. - Run
yarn install
to install Node.js dependencies - Run
createdb wad2_project_dev
to create a database - Run
yarn db:migrate
to migrate the database
The initdata script contains data useful for the app. In this case, it will initialise the database with games that we support.
To do this, run yarn db:initdata
in a terminal. Don't worry about running this too many times - the code here will ensure only 1 copy of data is made.
- Run
yarn dev
- Build
yarn build
- Run
yarn start