docs: fix formatting
This commit is contained in:
57
README.md
57
README.md
@@ -62,40 +62,41 @@ A browser-based railway simulation game using real world railway maps from OpenS
|
|||||||
|
|
||||||
10. Run quality checks:
|
10. Run quality checks:
|
||||||
|
|
||||||
- Backend unit tests: `pytest`
|
- Backend unit tests: `pytest`
|
||||||
- Backend formatters: `black backend/` and `isort backend/`
|
- Backend formatters: `black backend/` and `isort backend/`
|
||||||
- Frontend lint: `cd frontend && npm run lint`
|
- Frontend lint: `cd frontend && npm run lint`
|
||||||
- Frontend type/build check: `cd frontend && npm run build`
|
- Frontend type/build check: `cd frontend && npm run build`
|
||||||
|
|
||||||
11. Build for production:
|
11. Build for production:
|
||||||
|
|
||||||
- Frontend bundle: `cd frontend && npm run build`
|
- Frontend bundle: `cd frontend && npm run build`
|
||||||
- Backend container: `docker build -t rail-game-backend backend/`
|
- Backend container: `docker build -t rail-game-backend backend/`
|
||||||
|
|
||||||
12. Run containers:
|
12. Run containers:
|
||||||
|
|
||||||
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
||||||
- Frontend: Serve `frontend/dist` with any static file host.
|
- Frontend: Serve `frontend/dist` with any static file host.
|
||||||
cd frontend
|
cd frontend
|
||||||
npm install
|
npm install
|
||||||
cd ..
|
cd ..
|
||||||
```
|
|
||||||
|
````
|
||||||
|
|
||||||
11. Build for production:
|
11. Build for production:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
copy .env.example .env # PowerShell: Copy-Item .env.example .env
|
copy .env.example .env # PowerShell: Copy-Item .env.example .env
|
||||||
12. Run containers:
|
12. Run containers:
|
||||||
|
|
||||||
`DATABASE_URL`, `TEST_DATABASE_URL`, and `ALEMBIC_DATABASE_URL` control the runtime, test, and migration connections respectively.
|
`DATABASE_URL`, `TEST_DATABASE_URL`, and `ALEMBIC_DATABASE_URL` control the runtime, test, and migration connections respectively.
|
||||||
5. (Optional) Point Git to the bundled hooks: `pwsh scripts/setup_hooks.ps1`.
|
5. (Optional) Point Git to the bundled hooks: `pwsh scripts/setup_hooks.ps1`.
|
||||||
6. Run database migrations to set up the schema:
|
6. Run database migrations to set up the schema:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd backend
|
cd backend
|
||||||
alembic upgrade head
|
alembic upgrade head
|
||||||
cd ..
|
cd ..
|
||||||
```
|
````
|
||||||
|
|
||||||
7. Refresh OpenStreetMap fixtures (stations + tracks) into the local database:
|
7. Refresh OpenStreetMap fixtures (stations + tracks) into the local database:
|
||||||
|
|
||||||
@@ -113,20 +114,20 @@ A browser-based railway simulation game using real world railway maps from OpenS
|
|||||||
9. Open your browser: frontend runs at `http://localhost:5173`, backend API at `http://localhost:8000`.
|
9. Open your browser: frontend runs at `http://localhost:5173`, backend API at `http://localhost:8000`.
|
||||||
10. Run quality checks:
|
10. Run quality checks:
|
||||||
|
|
||||||
- Backend unit tests: `pytest`
|
- Backend unit tests: `pytest`
|
||||||
- Backend formatters: `black backend/` and `isort backend/`
|
- Backend formatters: `black backend/` and `isort backend/`
|
||||||
- Frontend lint: `cd frontend && npm run lint`
|
- Frontend lint: `cd frontend && npm run lint`
|
||||||
- Frontend type/build check: `cd frontend && npm run build`
|
- Frontend type/build check: `cd frontend && npm run build`
|
||||||
|
|
||||||
11. Build for production:
|
11. Build for production:
|
||||||
|
|
||||||
- Frontend bundle: `cd frontend && npm run build`
|
- Frontend bundle: `cd frontend && npm run build`
|
||||||
- Backend container: `docker build -t rail-game-backend backend/`
|
- Backend container: `docker build -t rail-game-backend backend/`
|
||||||
|
|
||||||
12. Run containers:
|
12. Run containers:
|
||||||
|
|
||||||
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
- Backend: `docker run -p 8000:8000 rail-game-backend`
|
||||||
- Frontend: Serve `frontend/dist` with any static file host.
|
- Frontend: Serve `frontend/dist` with any static file host.
|
||||||
|
|
||||||
## Database Migrations
|
## Database Migrations
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user