Skip to content

shopmonkeyus/devkit-examples

Repository files navigation

devkit-examples

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:

    ngrok config add-authtoken <your-auth-token>
  • Run ngrok:

    ngrok http 3030
  • Retrieve your ngrok url from the terminal

    ngrok url
  • 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
    mini app
  • If configured correctly, you should see the mini app on your selected page in Shop mini app