From b5dc38194bae8f7a2fc4686109d6995bf1fc1fcf Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 11 Jun 2022 08:36:43 +1000 Subject: [PATCH] Updated tutorial setup (markdown) --- tutorial-setup.md | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/tutorial-setup.md b/tutorial-setup.md index 6ab2dc4..bdf8399 100644 --- a/tutorial-setup.md +++ b/tutorial-setup.md @@ -42,7 +42,7 @@ node configure-script.js docker-compose up --build ``` -Surprisingly, once you've installed git, nodejs, docker.io via your favourite package managers (and docker-compose via [various methods](https://docs.docker.com/compose/install/)) you'll be able to run things pretty easily. +Surprisingly, once you've installed git, nodejs, docker.io via your favourite package managers, you'll be able to run things pretty easily. HOWEVER configure-script.js does do some heavy lifting before docker-compose - it generates three files: @@ -137,33 +137,7 @@ To set up the microservices locally, you'll first need to download them (probabl Each one has it's own `configure-script.js` for independent deployment, but in this case copy the `.envdev` file to a new file called `.env` and fill out each field, ensuring that the line `SECRET_ACCESS` matches between every program (including the MERN-template). -Next, you'll need to open the MERN-template's `webpack.config.js` file, and replace this: - -``` -new DefinePlugin({ - 'process.env': { - 'PRODUCTION': production, - 'NEWS_URI': production ? `"${process.env.NEWS_URI}"` : '"https://dev-news.krgamestudios.com"', - 'AUTH_URI': production ? `"${process.env.AUTH_URI}"` : '"https://dev-auth.krgamestudios.com"', - 'CHAT_URI': production ? `"${process.env.CHAT_URI}"` : '"https://dev-chat.krgamestudios.com"', - } -}), -``` - -With the following (this point the client at the correct localhost ports; notice the change in HTTP protocol): - -``` -new DefinePlugin({ - 'process.env': { - 'PRODUCTION': production, - 'NEWS_URI': production ? `"${process.env.NEWS_URI}"` : '"http://localhost:3100"', - 'AUTH_URI': production ? `"${process.env.AUTH_URI}"` : '"http://localhost:3200"', - 'CHAT_URI': production ? `"${process.env.CHAT_URI}"` : '"http://localhost:3300"', - } -}), -``` - -Finally, open a terminal for each project, point it to the project's directory and run `npm run dev`. Once each one reports that they're listening on a specific port (or when the MERN-template says it's finished compiling), then you can visit the local servers at `http://localhost:3001/`. +Finally, open a terminal for each project, point it to the project's directory and run `npm run dev` (or `npm run local` for the MERN-template). Once each one reports that they're listening on a specific port (or when the MERN-template says it's finished compiling), then you can visit the local servers at `http://localhost:3001/`. From here, you can log into the default admin account if you chose to create one, create local accounts and post local news, etc.