Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Template for Parse Server with PostgreSQL running on Docker

Notifications You must be signed in to change notification settings

jaeggerr/parse-server-boilerplate

Repository files navigation

Parse Server project boilerplate

Description

Boilerplate project for Parse Server

Cloud Code

The main file of the Cloud code is located in ./cloud/main.ts.

Warning - Javascript files in Cloud code are added to .gitignore.

PostgreSQL examples

There are plenty of ways to configure your database. Here are some basic example.

Create a new user for Parse and create a new database for your application

# Create a new user
$ createuser parse

# Set the password
$ psql -d postgres
postgres=# \password parse
postgres=# \q

# Create a new database
$ psql -U parse -d postgres
postgres=# CREATE DATABASE myApplication OWNER parse;

Dump the database

$ pg_dump -U parse -d myApplication > db-dump.sql

Load a dump to a database

$  psql -d myApplication -f db-dump.sql

Edit the Parse configuration

You can declare all the common configuration in ./config.common.json. The list of options can be found here.

Specific settings to your environment must be declared in config.environment.json. You can have as many environments as you want.

Both of those files will be merged when initializing the Parse server. By default, if not specified, the prod environment will be used.

Run the server

# In the project root folder
$ npm run start -- --env <environment> # Run the server in the wished environemnt. You can just run npm start to use the default prod environment.

About

Template for Parse Server with PostgreSQL running on Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published