Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ dist/

.mariadb/
db.html
package-lock.json
prosjektbeskrivelse.txt
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ See [Architecture](docs/architecture.md) for the architecture diagram and furthe

See the relevant documentation for setup and development instructions:

- [Running the website locally](docs/running-the-website-locally.md)
- [Frontend](frontend/README.md)
- [Backend and GraphQL API](backend/README.md)
- [Database setup](docs/database-setup.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/database-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sudo mariadb -u root

Create a database
```
MariaDB> CREATE DATABASE mydb;
MariaDB> CREATE DATABASE my_db;
```

Create a user
Expand Down
30 changes: 30 additions & 0 deletions docs/running-the-website-locally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Running the website locally

## Database setup

### Nix users

The nix flake for this project sets up the database for you. The flake sets up
the database using the credentials in the `backend/.env` file. You can get
everything set up by running this from the project root:

```
cp backend/.env.example backend/.env
nix develop
```

Note that you must have flakes enables as an experimental feature in your nix
config for this to work.

### Other users

Follow the instructions in [Database setup](docs/database-setup.md).

## Running the website

From the project root you must run the following two commands:

```
npm clean-install
npm run dev
```
274 changes: 274 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"name": "pokemondraftplanner-root",
"private": true,
"scripts": {
"postinstall": "npm --prefix backend install && npm --prefix frontend install",
"dev": "concurrently --kill-others-on-fail --names backend,frontend --prefix-colors blue,green \"npm --prefix backend run dev\" \"npm --prefix frontend run dev\"",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"devDependencies": {
"concurrently": "^10.0.6",
"prettier": "^3.9.10"
}
}