dehaze

Manual (using binary)

This guide helps you set up Space Cloud quickly on your local machine via its binary executable. It lets you explore the Space Cloud APIs on Postgres without having to set up any project.

If you instead want to start a project from scratch using Space Cloud, then check out the getting started guide.

Prerequisites

Note: Postgres is not a dependency of Space Cloud. You can use any other database that we support (MongoDB and MySQL).

Step 1: Download Space Cloud

The first step is to download the binary. You need to download the binary for your operating system, or you could build it directly from its source code. You need to have go version 1.13.0 or later to build it from source.

Download the binary for your OS from here:

You can unzip the compressed archive.

For Linux / Mac: unzip space-cloud.zip && chmod +x space-cloud

For Windows: Right-click on the archive and select extract here.

To make sure if the binary is correct, type the following command from the directory where the binary is downloaded:

For Linux / Mac: ./space-cloud -v

For Windows: space-cloud.exe -v

It should show something like this:

space-cloud-ee version 0.13.0

Step 2: Start Space Cloud

Note: Make sure your Postgres is up and running before this point

To start Space Cloud in dev mode, copy-paste the following command and hit enter:

For Linux / Mac: ./space-cloud run --dev

For Windows: space-cloud.exe run --dev

You should see something like this when Space Cloud starts:

Creating a new server with id auto-1T5fA9E1B2jeNUbV8R0fOPubRng
Starting http server on port: 4122

   Hosting mission control on http://localhost:4122/mission-control/

Space cloud is running on the specified ports :D

Note: The --dev flag tells Space Cloud to run in dev mode (so that the admin UI does not ask for a username and password)

Step 3: Configure Space Cloud

As you would have noticed, space-cloud generates a config.yaml file in the working directory.

Space Cloud needs this config file to function. The config file is used to load information like the database to be used, its connection string, security rules, etc.

Space Cloud has it’s own Mission Control (admin UI) to configure all of this quickly.

Open Mission Control

Head over to http://localhost:4122/mission-control to open Mission Control.

Note: Replace localhost with the address of your Space Cloud if you are not running it locally.

Creating a project

Click on Create a Project button to open the following screen:

Create a project screen

Give a name to your project.

Select POSTGRESQL as your database.

Hit Next to create the project.

Configuring DB config

Head over to the Database section:

As you can see, the Overview tab shows the connection status (i.e. whether Space Cloud is connected or not to your database).

If it shows disconnected, then click on the edit button to enter the correct connection string of your database:

Edit connection details

That’s all that is required to configure Space Cloud for this guide!

Step4: Let us try it out

Our backend is up and running, configured to expose APIs on Postgres. Time to explore its awesome powers.

Explore GraphQL APIs of Space Cloud using GraphiQL.

Have a technical question?

Improve the docs!