Giter Club home page Giter Club logo

vpn-website-1's Introduction

VPN Sample Business Website

A mostly front-end sample website created using React. Currently, there is no checkout or purchase page on this website, as this is a showcase of my basic front-end skills. The back-end is created using Express and has the job of setting the user's cookies and fetching API requests.

Getting Started

Download or clone the project to get started. No configuration is needed for the project to work on a local server, as dummy data will be inserted if the client is unable to connect to the server.

Visit a live version of the site here: VPN Site

Install

To run on your local machine, install the dependencies and then we will run two scripts.

Step 1: Open a node js command prompt or console and navigate to the server folder. Then run the following command:

yarn server

Step 2: Open a separate node js command prompt or console and navigate to the client folder. Then run the following command:

yarn start

Ta-da! Hopefully everything is working.

Deployment

A production ready deployment can be made with a few extra configurations.

Step 1: Navigate to the server folder and then to the keys folder. Then, create a file named dev.js.

server ---
        |
        keys ---
              |
              dev.js <--- Create this file
              keys.js
              prod.js

Step 2: In the dev.js file paste the following:

module.exports = {
  apiURL: "https://community-neutrino-ip-info.p.rapidapi.com/ip-info",
  apiHeader: "X-RapidAPI-Key",
  apiKey: "YOUR_API_KEY_HERE",
  cryptrKey: "INSERT_RANDOM_LETTERS_HERE",
  apiGoogleMaps: "YOUR_GOOGLE_MAPS_API_KEY_HERE"
};

dev.js file notes:

  • Never deply the dev.js file to github
  • For apiKey, head over to rapidapi and create an account. Use the API key that is provided to your account
  • Replace the apiGoogleMaps with your own public Google Maps API key
  • For cryptrKey, put any set of random letters

Step 3: Navigate to the UserGoogleMaps.js file and replace the Google Maps API key with your own. Make sure to only put your public google maps API key, not your private key.

client ---
        |
        src ---
              |
              containers ---
                          |
                          UserIp ---
                                  |
                                  UserGoogleMaps
                                        |
                                        UserGoogleMaps.js

Step 4: If you are deploying to heroku or any other development server, make sure to set your config vars to the ones in the dev.js file

Step 5: Push all changes to your development server.

Authors

Acknowledgments

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.