This app has no ui, it's just a simple api server.
- API routes can be accessed on
http://localhost:3030/api/*
. This endpoint can be edited in/src/pages/api/*
.
First, install the dependencies:
npm i
# or
yarn i
# or
pnpm i
# or
bun i
Then run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Next run ngrok to expose your local api to the internet:
-
Install ngrok: Getting Started with ngrok
-
Setup your ngrok auth token:
- Sign up for an account and get your auth token: https://dashboard.ngrok.com/get-started/setup/macos
ngrok config add-authtoken <your-auth-token>
-
Run ngrok:
ngrok http 3030
-
Retrieve your ngrok url from the terminal
-
Ping your ngrok url to test the api:
curl https://<ngrok-url>/api/ping
-
You can now use this url to create a mini app in HQ that connects to your api
https://<ngrok-url>/api/hello_world
-
If configured correctly, you should see the mini app on your selected page in Shop