Build Your Application

Expanding on Gravity to develop your own application is as simple as adding your own models and connecting them up to a controller.

Defining New Routes

You can create new pages within /client/src/app/app.js and API calls inside /api.js

Performing Database Queries

Database queries are executed with:

db.query(query, [params])

User Interface

Creating your user interface is as easy as copy and paste. You can find examples of most UI elements you will need within the UI section of this documentation.

Simply copy the examples and paste them into a view within your application.


You can manage your application settings using the settings.json file.

Handling Errors

Gravity users a higher order function to handle errors – that means you don't need to have endless try/catch statements throughout your application.

When creating a new API route, simply wrap your handler function in the use() function and it will take care of console logging errors and returning a notification to the front end too.


Deploying Your Application

When switching to your live domain, you will need to update the domain flag inside settings.json

Managing Accounts & Users

You can manage your users by signing into your master dashboard at http://localhost:3000/master

Get Started with React