SvelteKit

1. Setup JamAIBase project.

  • Create a new project.

  • Get the Project ID.

  • Create JamAI API Key at Organization > Secrets > Create API Key.

2. Create a SvelteKit app using the npm create command.

3. Install the JamAI Base client library, jamaibase

4. Create a .env file at the root or your project and add the keys

5. Create a page

We will create a UI that will create a new action table.

Create a new file src/routes/create-table/+page.svelte and add the following form.

6. Create a form action

We will utilize form action provided by sveltekit to accept the inputs from the client side. Then use jamai client to create a action table.

Create a +page.server.ts file in the same path of the form element to accept post data from the form.

7. Start the app

Start the app and go to http://localhost:5173 in a browser.

Last updated

Was this helpful?