Install Gravity

Finally, time for the fun part – let's get your new application running!

These instructions apply to Gravity Web & Power plans only. If you purchased Gravity Native please follow these installation instructions.

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

npm run setup

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

If you experience any issues during this process; you can run a manual install using the following commands.

npm install
cd client
npm install
// for Gravity Power also use
cd app
npm install
// if npm v7 fails to install peer dependancies, please run
npm install -force

Once installation has completed, Gravity will start the server and client and open a new browser window with the homepage, please navigate to http://localhost:3000/setup.

You'll be presented with the Gravity setup welcome screen. Follow the instructions on screen to connect to your database, create a master account and then connect your Stripe and Mailgun accounts.

If you have any problems during setup, you can manually config your application in the /config folder.

Once you have completed these steps, you must restart your node server.

Use the following command to run both the server and client. Use this from now on any time you want to run your application.

npm run dev

Your browser window will open automatically and you can click on signup and create an account.

You MUST remove the following files from your install after setup. Failing to do so, will let anyone access the setup process.

  • /client/src/views/setup

  • /controller/setupController

  • /model/setup

  • the setup endpoints in /api and /api/index.js

  • the setup routes in /client/src/app.js

It's recommended that you run npm audit in each installation folder to ensure third-party packages are up to date and secure.