update installation instructions

This commit is contained in:
Kalle (Sendou) 2020-09-29 01:57:59 +03:00
parent 709d85c52d
commit ac11f23402
2 changed files with 19 additions and 7 deletions

11
.env.template Normal file
View File

@ -0,0 +1,11 @@
ADMIN_ID=[discord id]
GANBA_ID=[discord id]
CLIENT_ID=[id of the discord app for login]
CLIENT_SECRET=[secret of the discord app for login]
FA_WEBHOOK_URL=[webhook url where new FA posts get posted about on Discord]
MONGODB_URI=[MongoDB connection uri]
POSTGRESQL_URI=[PostgreSQL connection uri]
SESSION_SECRET=[random string]
NODE_ENV=development
LANISTA_TOKEN=[random string to test lanista bot integration]
LOHI_TOKEN=[random string to test lohi bot integration]

View File

@ -37,17 +37,18 @@ This site was originally a full stack web development school project. Since I ha
Serving the site is a GraphQL API. You can explore the schema here: [https://sendou.ink/graphql](https://sendou.ink/graphql). It was made specifically for this site but you are free to use it within reason if it is of use to you.
## Installation (TODO: improve this)
## Installation & getting started
1. Install [Node](https://nodejs.org/en/)
2. Use `npm install` in the root folder
3. Use `npm install` in the **/react-ui** folder
4. Use `npm run watch` in the root folder
5. Use `npm start` in the **/react-ui** folder
2. Use the `npm run install:all` command in the root folder
3. Make a copy of the `.env.template` file and rename it to `.env`. Populate the values depending on what you are developing. Database URI's at least are necessary to spin up the backend.
4. Use the `npm run dev` command in the root folder to develop logged out and `npm run dev:loggedin` to develop logged in as a mocked user.
In addition connection to MongoDB as well as a few other ENV variables need to be configured.
- Please note that the scripts are currently assuming an \*NIX based system so trying to run them on PowerShell or something might not work.
Server will run on [http://localhost:3001/](http://localhost:3001/)
Making the installation process smoother is one big point of improvement hopefully in the near future.
Server will run on [http://localhost:3001/graphql](http://localhost:3001/)
Front-end will run on [http://localhost:3000/](http://localhost:3000/)
## Contributing