Welcome to our webshop app!
Visit our webshop here: https://give-your-best-webshop.herokuapp.com/
And visit our webpage here: https://www.giveyourbest.uk/
Note: Until we automate this process and fetch the .env vars from Heroku/AWS Secrets/similar service,
you will need to manually input the database URI in the .env
file in order to connect to the database.
See further below the steps how to set it up.
Clone the app with:
git clone https://github.com/Give-Your-Best/webshop.git
Then cd
into /webshop
.
Install the server dependencies with:
npm i
and the client dependencies with:
cd client && npm i
Then run the app:
npm run start:dev
This will run both the server and the client, and open localhost:3000 in Chrome.
If you want to run separately the server and the client, hit:
npm run start:server
and in another terminal session:
npm run start:client
Open the code in an editor of your choice, and you're ready to go!
Storybook is configured for this app.
To run Storybook, head to the client: cd client
and run: npm run storybook
.
Alternatively, you can run storybook from the root directory, with:
npm run start:storybook
Storybook will run on port 6006.
.env
file in the root dir of the repo, and add a variable with the name DB_CONNECTION_URI
and a value of the string
you just copied, replacing the username & password with your values (from step 3) and replacing the /test
part with /webshop?retryWrites=true&w=majority
Everything is in Bitwarden!
If you develop in this project, you should have access already. Otherwise, ask Eirini and/or Sol for more info!