Skip to content

Commit a9229de

Browse files
committed
Update README with install instructions.
1 parent 4c70437 commit a9229de

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,42 @@ Additionally, you may also use our discussions forum [here](https://github.com/o
4040
* [Reddit](https://reddit.com/r/bestmods)
4141

4242
## Installation & Deployment
43-
*To be continued...*
43+
### Requirements
44+
* PostgreSQL (unless you choose SQLite; See below).
45+
* Node >=14
46+
* NPM
47+
48+
### Using SQLite
49+
To use a local SQLite database, perform the following steps.
50+
1. In `prisma/schema.prisma`, replace `provider = "postgresql"` with `provider = "sqlite"`.
51+
1. In `prisma/schema.prisma`, remove all instances of `@db.Text` because PostgreSQL and SQLite have different column definitions for string.
52+
1. In `.env`, set `DATABASE_URL` to `file:./db.sqlite`.
53+
54+
### Installation & Running Dev Server
55+
You may perform the following commands to run the dev web server.
56+
57+
```bash
58+
# Clone respository.
59+
git clone https://github.com/bestmods/bestmods.git
60+
61+
# Change directory.
62+
cd bestmods
63+
64+
# Update and install NPM packages.
65+
npm update
66+
npm install
67+
68+
# Migrate database.
69+
npx prisma db push
70+
71+
# Run dev server.
72+
npm run dev
73+
```
74+
75+
### Production
76+
To run in production, you can use the `npx next build` command to build the web application. Make sure to add `output: "standalone"` to the config variable in `next.config.mjs`.
77+
78+
With that said, you may then run `node server.js`.
4479

4580
## Showcase
4681
<a href="https://bestmods.io/view/mc-jurassicraft" target="_blank"><img src="https://github.com/bestmods/bestmods/blob/main/gitimages/preview2.jpeg" data-canonical-src="https://github.com/BestMods/bestmods/blob/main/gitimages/preview2.jpeg" /></a>

0 commit comments

Comments
 (0)