Remix
In this guide, we will discuss how to setup a Remix project, that uses Onboardbase to manage its secrets(environment variables)
This section assumes you already have a project set up in Onboardbase Dashboard. If you don't, please create an account and get started!
Setting up Remix
Setup a remix project with npm by running the following command
npx create-remix --template remix-run/indie-stack blog-tutorial
Running the remix project
Create a .onboardbase.yaml file in your project root and populate it as shown below
api_key: "****ANCAME3CFKJG******"
passcode: "TEST_PASSCODE"
setup:
project: "test-project"
environment: "development"
Install the onboardbase SDK by running the following commands
npm install @onboardbase/secrets
or
yarn add @onboardbase/secrets
in your remix project, import the onboardbase SDK and fetch the secrets as such
import {Secrets} from "@onboardbase/secrets"
Secrets.init().then(
(secrets) => {
console.log(secrets.get());
}
).catch((err) => console.log(err))
Build the application with npm run build
and yarn start
, and Onboardbase will populate the application with the required environment variables.
Updated about 1 year ago