项目作者: samarth-sangam

项目描述 :
Geocode of an address using Node
高级语言: JavaScript
项目地址: git://github.com/samarth-sangam/node-geocode.git
创建时间: 2020-04-05T07:37:24Z
项目社区:https://github.com/samarth-sangam/node-geocode

开源协议:

下载


node-geocode

Forward geocode of a address using mapbox API.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  1. nodejs
  2. API Key of Mapbox

Installing

A step by step series of examples that tell you how to get a development env running

Clone the repository to node-geocode directory

  1. cd node-geocode
  2. npm install

Post Installation

Create .env file at the root of folder.
Add below lines.

  1. #.env
  2. NODE_ENV=development
  3. PORT=3000 ...or any other port
  4. MAPBOX_KEY=<API_KEY>

npm run dev to run developlement

Deployment

Deployment steps to deploy on heroku.

To Verify

  1. heroku --version

Add ssh key

  1. ssh-keygen -t rsa -b 4096 -C "<your email id>"
  2. ssh-add ~/.ssh/id_rsa

Create heroku application

  1. heroku create <app-name>
  2. heroku config:set MAPBOX_KEY=<Mapbox api key>

Add files to git

Add files to heroku

  1. git push heroku master

Author

  • Samarth Sangam

Acknowlegdement

  • Andrew Mead