From ac11f23402d965bafb2bebf9dbf38c3328289d8f Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Tue, 29 Sep 2020 01:57:59 +0300 Subject: [PATCH] update installation instructions --- .env.template | 11 +++++++++++ README.md | 15 ++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .env.template diff --git a/.env.template b/.env.template new file mode 100644 index 000000000..569ac8095 --- /dev/null +++ b/.env.template @@ -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] \ No newline at end of file diff --git a/README.md b/README.md index 886d487ee..a7206bce7 100644 --- a/README.md +++ b/README.md @@ -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