Skip to content

Commit ab3fbe6

Browse files
authored
Merge pull request #1 from jcjimenez/master
Added README.md
2 parents fc3633f + 07d5859 commit ab3fbe6

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
featureService
2+
==============
3+
4+
Development Setup
5+
=====
6+
In order to install on your local machine, you will need to install:
7+
8+
1. Postgres + postgis
9+
2. Node
10+
11+
Once those are installed, go open a bash shell on the project directory and type:
12+
13+
```
14+
psql postgres
15+
```
16+
17+
You will be welcomed with the postgres prompt. Now, create the geofeatures database and switch to it:
18+
19+
```
20+
CREATE DATABASE geofeatures;
21+
\c geofeatures;
22+
```
23+
24+
There enter the SQL statements at the top of these two files (in that order):
25+
26+
```
27+
services/features.js
28+
services/visits.js
29+
```
30+
31+
Make sure the frontend user has access to the geofeatures database:
32+
33+
```
34+
GRANT ALL PRIVILEGES ON DATABASE geofeatures TO frontend;
35+
```
36+
37+
Then, make sure the environment variable for the newly-created user is set:
38+
39+
```
40+
export FEATURES_CONNECTION_STRING='postgres://frontend:[euro4sure]@127.0.0.1/geofeatures'
41+
export PORT=3035
42+
```
43+
44+
Now, make sure the nodejs dependencies are installed:
45+
46+
```
47+
npm install
48+
```
49+
50+
Running
51+
=======
52+
All you need to do is run:
53+
54+
```
55+
node server.js
56+
```

0 commit comments

Comments
 (0)