Web app for regular online competitions in rubik's cube solving and a place for Slovak speedcubing community.
Make sure to have Git installed.
Clone this repository. https://github.com/jakubdrobny/speedcubingslovakia.git
- Install PostgreSQL with
sudo apt-get install postgres
. - Create some user, or configure password default user
postgres
. - Run
psql -U postgres
and then insidepsql
runCREATE DATABASE <database_name>;
to create the database. - Exit
psql
with CTRL+D and inside/backend/.env.developement
changespeedcubingslovakiadb_local
to your<database_name>
, similarly forusername
andpassword
. - Populate/initialize the database by running
psql -U <username> -d <database_name> -f initialize_db.sql
inside the/database
directory.
- Install Go 1.22.0.
- Run
go get <package_name>
for packages models, constants, middlewares, main, controllers, utils, cube to install dependencies. - Add
SPEEDCUBINGSLOVAKIA_BACKEND_ENV=development
to your~/.profile
and runsource ~/.profile
to realize the changes in current terminal. - Run
go run main/main.go
in the backend directory to start the server.
- Install PM2 with
npm install -g pm2
. - Run
npm install
inside thescrambling
directory to install dependencies. - Run
pm2 start index.js --name scrambling.service
inside thescrambling
directory.
- Install
npm
withapt install npm
. - Install latest Node.js version with
npm i node@lts
and then all the dependencies withnpm install
. - Start the frontend with
npm start
.
You should now be able to have a local instance of the app running :)