-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove duplication in documentation #148
Changes from 6 commits
65660ad
6c7e51e
f6c6a88
9043973
cf0c214
e4b1430
6f9c658
0c783e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Forms | ||
|
||
A part of the ShipEngine Connect platform is allowing integrations to define their own forms used for things like registering or connecting a new account, and updating settings in the case of shipping integrations. These forms are defined using a library call `rect-jsonschema-form` and are comprised of two parts, a `JsonSchema` and a `UiSchema`. | ||
A part of the ShipEngine Connect platform is allowing integrations to define | ||
their own forms used for things like registering or connecting a new account. | ||
These forms are defined using the [react-jsonschema-form](https://rjsf-team.github.io/react-jsonschema-form/docs/) syntax, and are comprised of two parts, a `JsonSchema` and a `UiSchema`. |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
title: Managing App Environment Variables | ||
title: Managing Configuration | ||
--- | ||
|
||
# Managing Environment Variables | ||
# Managing Configuration | ||
|
||
The `shipengine-connect env` command allows you to set environment variables that | ||
will be available to your app once it is published to ShipEngine Connect. This | ||
|
@@ -19,28 +19,57 @@ When you run the `shipengine-connect env` command, you will include one of its | |
subcommands listed below to indicate which environment variable action you would | ||
like to perform. | ||
|
||
## Set Environment Variables | ||
## Commands | ||
|
||
### Set Environment Variables | ||
This subcommand sets one or more environment variables. | ||
|
||
`shipengine-connect env:set NAME=value NAME_2=value2 ... NAME_N=valueN [OPTIONS]` | ||
|
||
Example: | ||
|
||
```bash | ||
shipengine-connect env:set NAME=value NAME_2=value2 ... NAME_N=valueN [OPTIONS] | ||
shipengine-connect env:set API_URL=https://www.sandbox.example.com/api API_KEY=3435dfafa32424 | ||
``` | ||
|
||
## Get Environment Variables | ||
This subcommand lists the current value for one or more environment variables. | ||
```bash | ||
shipengine-connect env:get NAME NAME_2 ... NAME_N [OPTIONS] | ||
Output: | ||
|
||
``` | ||
API_URL=https://www.sandbox.example.com/api has been set | ||
API_KEY=3435dfafa32424 has been set | ||
``` | ||
|
||
## List Environment Variables | ||
### List Environment Variables | ||
This subcommand lists the values of all environment variables. | ||
|
||
`shipengine-connect env:list [OPTIONS]` | ||
|
||
Example: | ||
|
||
```bash | ||
shipengine-connect env:list | ||
``` | ||
|
||
### Get Environment Variables | ||
This subcommand lists the current value for one or more environment variables. | ||
|
||
`shipengine-connect env:get NAME NAME_2 ... NAME_N [OPTIONS]` | ||
|
||
Example: | ||
|
||
```bash | ||
shipengine-connect env:list [OPTIONS] | ||
shipengine-connect env:get API_URL | ||
``` | ||
|
||
## Unset Environment Variables | ||
### Unset Environment Variables | ||
This subcommand unsets one or more environment variables. | ||
|
||
`shipengine-connect env:unset NAME NAME_2 ... NAME_N [OPTIONS]` | ||
|
||
Example: | ||
|
||
```bash | ||
shipengine-connect env:unset NAME NAME_2 ... NAME_N [OPTIONS] | ||
shipengine-connect env:unset API_URL | ||
``` | ||
|
||
## Options | ||
|
@@ -54,3 +83,22 @@ This option formats the output of the `shipengine-connect list` command. Set | |
this option to `table` to list the environment variables in a table format or | ||
`dotenv` to list the environment variables in the | ||
[dotenv](https://www.npmjs.com/package/dotenv) format. | ||
|
||
## Recommendations | ||
|
||
### Single File | ||
We typically recommend having a single file in your project where you access your enviornment variables. This could be a `constants.ts` file, and we recommend having preset values that default to staging variables. | ||
|
||
**Example** | ||
|
||
```TypeScript constants.ts | ||
export const API_URL = process.env.API_URL ?? 'https://www.sandbox.example.com/api'; | ||
``` | ||
```TypeScript consumer.ts | ||
import { API_URL } from './constants' | ||
|
||
``` | ||
|
||
### Moving to Production | ||
We recommend when reaching out to the [ShipEngine Connect Team](mailto:[email protected]) to have your application moved into our production systems, that you also notify them of any environment variables that will need to be set, and what their values should be in both testing and production environments. | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing as. ... any file as demonstrated below.