Giter Site home page Giter Site logo

node-api-proxy's Introduction

Node API Proxy

Proxy API-calls through an express-server

This repository contains everything to run a simpler API proxy. You can either use the deploy button to create everything automatically. It should work in most cases. Or you can clone the repo and do it yourself.

Deploy directly to Heroku (requires login):

Deploy

Manual Instructions

1 . Clone repository and cd into the folder.

2 . Install dependencies

npm install

3 . Create a .env file in the root folder and enter your credentials. .env.example is a template for setting your credentials:

API_URL=
API_KEY_NAME=
API_KEY_VALUE=
  1. Start the server by running the start script:
npm start
  1. Make your API-requests to http://localhost:3000 instead.

Manual Deploy

1 . Create an account on https://heroku.com. This should be pretty straight forward.

2 . Install the Heroku CLI on your computer:
https://devcenter.heroku.com/articles/heroku-cli.

Check that you have the heroku-cli installed by checking the version number in your terminal:

heroku --version

3 . Connect the Heroku CLI to your account by writing the following command in your terminal and follow the instructions on the command line:

heroku login

Use your credentials from the earlier account creation.

4 . Then create a remote heroku project, kinda like creating a git repository on GitHub. This will create a project on Heroku with a random name. If you want to name your app you have to supply your own name like heroku create project-name. The command below will just create a random name:

heroku create

5 . Push your app to Heroku like pushing to GitHub expect for origin you have heroku (you will see a wall of code).

git push heroku master

6 . Visit your newly create app by opening it via heroku:

heroku open

If you are getting errors you can view the error logs by running this command:

heroku logs --tail

This might give you a hint on what's wrong.

node-api-proxy's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.