Skip to content

Commit c36660d

Browse files
authored
Revert "Update deploy to Glitch (formerly HyperDev) docs (#585)" (#591)
This reverts commit 160b3e7.
1 parent 160b3e7 commit c36660d

File tree

4 files changed

+65
-68
lines changed

4 files changed

+65
-68
lines changed

_includes/parse-server/deploying-glitch-mlab.md

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Deploying to HyperDev and mLab
2+
3+
Before you start, you'll need:
4+
5+
- GitHub account (for HyperDev import feature)
6+
- mLab account (for free MongoDB)
7+
8+
### Step 1: Creating your database on mLab
9+
10+
[mLab](https://mlab.com) provides a Database-as-a-Service for MongoDB. They include a free tier for small sandbox databases. Create an account on mLab and then use the Single-node, Sandbox plan to get a (free) database up and running. Within the mLab wizard, you'll need to be sure to create a user that has access to connect to the new database. Upon completion, you should be able to construct a Mongo DB connection string like the following:
11+
12+
```
13+
mongodb://yourusername:[email protected]:yourdatabaseport/yourdatabasename
14+
```
15+
16+
### Step 2: Running parse-server-example on HyperDev
17+
18+
[HyperDev](https://hyperdev.com) provides a great way to instantly create and deploy Node.js applications for free. We will use it to run the [parse-server-example](https://github.com/parse-community/parse-server-example) application.
19+
20+
Access hyperdev.com and you'll be given a sandbox app with a random name (usually of the form ```noun-noun```). Sign in to HyperDev using your GitHub account. Then, use the "Advanced Options" menu to import code from GitHub. When prompted for the repository to import, enter
21+
22+
```
23+
parse-community/parse-server-example
24+
```
25+
26+
Now that the import is complete, we'll need to configure the application to point to our mLab database. Modify the ```.env``` file, which stores private environment variables.
27+
28+
Use the following template:
29+
30+
```
31+
# Environment Config
32+
33+
# store your secrets and config variables in here
34+
# only invited collaborators will be able to see your .env values
35+
36+
# reference these in your code with process.env.SECRET
37+
38+
APP_ID=myAppId
39+
MASTER_KEY=your_master_key_here
40+
DATABASE_URI=mongodb://yourusername:[email protected]:yourdatabaseport/yourdatabasename
41+
42+
#your SERVER_URL will depend on whatever URL hyperdev/glitch gives you
43+
SERVER_URL=https://noun-noun.glitch.me/parse
44+
45+
#hyperdev will only let you log to this folder
46+
PARSE_SERVER_LOGS_FOLDER=/tmp
47+
48+
# note: .env is a shell file so there can't be spaces around '=
49+
```
50+
51+
It is important, for this tutorial, to leave the ```APP_ID``` as ```myAppId``` as the "test" page hard-codes that and expects that value.
52+
53+
### Step 3: Testing
54+
55+
Once you're finished making your changes to your .env file, HyperDev will automatically build and deploy your application. If you use the Logs feature within HyperDev (there's a Logs button), you should see this when your app is deployed:
56+
57+
```
58+
Launching node index.js
59+
parse-server-example running on port 3000.
60+
```
61+
62+
You should then be able to use the "Show" button to launch the application in the browser and get to a page that urges you to star the parse-server GitHub repository. To access the test harness page, add a trailing ```/test``` to your URL. This should take you to a page that will allow you to exercise a few parts of the Parse Server Javascript SDK and create a dummy collection and record in your MongoDB. If you're able to completes steps one through three on this test page, Parse Server is up and running. Optionally, you can go back to mLab.com and take a look at the data that was stored by the test harness to get a feel for how Parse Server stores data in MongoDB.

_includes/parse-server/deploying.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The fastest and easiest way to start using Parse Server is to run MongoDB and Pa
44

55
{% include_relative _includes/parse-server/deploying-heroku-mlab.md %}
66

7-
{% include_relative _includes/parse-server/deploying-glitch-mlab.md %}
7+
{% include_relative _includes/parse-server/deploying-hyperdev-mlab.md %}

assets/js/bundle.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)