Gravity Installation

Now for the fun part – let's get Gravity up and running!

1. Install Dependencies

Open up a new terminal window and navigate to the folder where you have saved Gravity and run the following command:

npm install

You will need then to change into the client folder:

cd client

Then run install again to install the React modules:

npm install

This will download and install all the dependencies required to run Gravity using NPM (which you installed earlier).

It's a good idea to run an audit at this point to check for (and fix) any security issues with third party modules.

npm audit

2. Start Your Application

You can now start your application. In terminal, type the following and press enter:

npm run setup

This will start the Node server and React. In your browser navigate to: http://localhost:3000/setup and you will be presented with the Gravity welcome screen.

Follow the steps on screen to set up your database and connect your Stripe and Mailgun accounts.

Then please stop your node server and run:

npm run dev

You can then click on signup and create an account.

Important!

Once you have completed the setup process, you MUST remove the following from your install. Failing to do so, will let anyone access the setup process.

  • /client/src/views/setup
  • /controller/setupController
  • /model/setup
  • the setup endpoints in /api
  • the setup routes in /client/src/app.js
Build Your Application