From f98aa9933044f4d4e2d460472fb4915dcf7fdbd2 Mon Sep 17 00:00:00 2001 From: muerwre <33246675+muerwre@users.noreply.github.com> Date: Fri, 30 Nov 2018 15:28:42 +0700 Subject: [PATCH] Update README.md --- README.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2276fa5..1dba9e2 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,14 @@ Bicycle routes app with automatic routes, map screenshots, stickers and other features. ## Prerequisites -npm, php, imagemagick, osrm-server +node, osrm-server -### Installing frontend +### Installing First, download and install the project ``` git clone https://github.com/muerwre/orchidMap.git cd orchidMap npm i -npm start ``` ### Setting up OSRM @@ -20,9 +19,22 @@ Specify country and region in osrm/prepare_maps.sh or download .pbf file from ht After starting ./prepare_maps you'll get parsed .osrm files for Open Source Routing Machine server. Next you need to edit start_server.sh to specify address, port for server and path to parsed files. + After that run start_server.sh in screen or by the way you feel comfortable. -### Configuring backend +Next edit ```./src/config.js``` and specify OSRM url there. By default, OSRM starts at ```http://localhost:5000/``` -Comming soon... +### Frontend +Configs are placed in ```./src/config.js``` and ```./src/constants/``` + +For development launch ```npm start``` and visit ```http://localhost:8000/``` + +For production launch ```npm build```, the output will be placed at ```./dist``` folder, you should configure your http server to serve index html from that folder. + +### Backend +Take a look at ```./backend/config/``` files, especially at ```db.js```. Your api server will be spawned at ```http://localhost:3000/``` + +For development launch ```npm serve-dev```, it will launch dev server, reloading on every code update + +For production launch ```npm serve``` and make it running in background by any desireable way, such as ```forever```