https://github.com/shipengine/shipenguin_web_app
The source code for the Shipenguin web app, this project serves as a reference implementation of address validation, rates, and labels powered by ShipEngine.
https://github.com/shipengine/shipenguin_web_app
address-validation rest-api sample-app shipping shipping-api shipping-label shipping-rates
Last synced: 3 months ago
JSON representation
The source code for the Shipenguin web app, this project serves as a reference implementation of address validation, rates, and labels powered by ShipEngine.
- Host: GitHub
- URL: https://github.com/shipengine/shipenguin_web_app
- Owner: ShipEngine
- License: mit
- Created: 2020-07-20T22:46:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T17:48:24.000Z (over 4 years ago)
- Last Synced: 2024-12-29T23:49:06.417Z (5 months ago)
- Topics: address-validation, rest-api, sample-app, shipping, shipping-api, shipping-label, shipping-rates
- Language: CSS
- Homepage: https://shipenguin-dev.herokuapp.com/
- Size: 6.69 MB
- Stars: 2
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shipenguin Web App (In Development)
- See it action here: https://shipenguin-dev.herokuapp.com/
This is a reference implementation of the following ShipEngine API services:
* Address Validation
* Shipping Rates
* Shipping Labels- The first step to run this source code locally, will be creating a `.env` file in the project directory. You can copy the contents of [.env.example](./.env.example "Environment Variable Template") and add in your own values before starting the server.
* *Note:* You will need to create a free [ShipEngine Account](https://www.shipengine.com/signup "Create a ShipEngine Account") to obtain Sandbox and Production API Key's and carrier_id's to run this application successfully.
- Next, you will install the projects' dependencies at the command line.```npm
npm install && npm start
```
- Go to the server address in your browser `https://.ngrok.io/` listening on port `8000`. When you run `npm start` you will see the server address provided in your terminal.- This app also uses [Stripe](https://stripe.com/docs "Stripe Developer Portal") for payments.
* You can use the following test card information to pay for the label:
* `4242 4242 4242 4242` `CVV:` `EXP:` `ZIPCODE:`
## Local Development
When running this code in development mode if you do not have an NGROK account, use the following npm script:
```npm
npm run dev
```
- This runs with the `NODE_ENV` set to `production` because there is logic in [server/node/config.js](./server/node/config.js "Local config.js file") on line 74.
If you have an NGROK account and have added your NGROK authtoken to your `.env` file, use the following npm script:
```npm
npm run dev:ngrok
```
- This runs with the `NODE_ENV` set to `development` to trigger the NGROK config to use your NGROK authtoken and subdomain.