ambtbls v3.0.2
Ambassador Tables
Ambassador Tables is a demo app for custom tables.
Getting the app running
1) Make sure you are running node v10.11.0 and npm v6.4.1
2) Clone the ambassador-tables repo:
git clone git@github.com:GetAmbassador/ambassador-tables.git
3) Move into the project:
cd ambassador-tables
4) Set environment variables
Make a copy of the sample environment:
cp sample.env .env
And populate with the following environment variables:
- NODE_ENV - This will be set to `development` or `production`.
- API_URL - The hostname of the Ambassador API you wish to use. For local dev use `https://dev-ambassador-api.herokuapp.com`.
- APP_URL - The hostname of the Ambassador app you wish to use. For local dev use `https://dev-admin.getambassador.com`.
- SNIPPET_URL - The hostname of the Snippet app you wish to use.
5) Install node packages:
npm install
6) Run the app:
npm start
Point your browser to http://localhost:3000
Testing
Using the package
To install the package in an app you will need to be logged into npm as "ambassador" and then run:
npm install @ambassador/ambtbls --save
To import a component from the package use the scoped name:
import Table from '@ambassador/ambtbls'
If you are installing ambassador-tables on an app that uses CircleCI you can follow the instructions here to set up npm authentication within Circle.
If you are installing ambassador-tables on an app that uses Heroku you can follow the instructions here to set up npm authentication within Heroku.