Before you begin
If you have already tried our Embed a New Space guide you will notice this guide departs heavily, so you will want to create this in a new directory, as translation would be more difficult than creating from scratch.Get your keys
To complete this tutorial, you'll need to retrieve your Secret key from yourdevelopment
environment.
Note: Unlike the Publishable Key, the Secret Key shouldn’t be passed through
the browser as it will have full access. This is why we are showing this
example in a server-side call.
new
command.
1. Set up Configuration Files
This app has some configuration files that must be set up before you can get started with development. Set them up as shown below.package.json
to start the app. Add the following scripts:
pacakge.json (snippet)
2. Create the Server
Lets create the server that will act as the backend of the application. This will be necessary to serve the pages as well as get the existing space, as due to security reasons the Secret Key cannot be exposed to the browser at any time.server/index.ts
3. Build your existing Space Component
The component should end up looking something like this:src/app/app.component.ts
app.component.html
to include the existing space component. It should end up looking like the below:
src/app/app.component.html