Everything you need to build a Solid project, powered by solid-start;
# create a new project in the current directory
npm init solid@latest
# create a new project in my-app
npm init solid@latest my-appOnce you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --openPayment providers like PayMongo require a public HTTPS URL for webhooks. ngrok creates a secure a public tunnel:
https://abc123.ngrok-free.app
that forwards to:
http://localhost:3000
- Install:
npm install -g ngrok- Authenticate:
ngrok config add-authtoken YOUR_TOKEN- Start tunnnel:
ngrok http 3000You'll see:
Forwarding https://abc123.ngrok-free.app -> http://localhost:3000- In PayMongo Dashboard -> Webhooks:
https://abc123.ngrok-free.app/api/webhooks/paymongo
This matches the API route.
- User checksout
- PayMongo checkout page opens
- User completes payment
- PayMongo sends webhook -> ngrok URL
- ngrok forwards -> localhost
- SolidJS webhook updates DB
You can view ngrok requests in:
http://127.0.0.1:4040
You can:
- Inspect request body
- Replay webhook
- See response status
Do NOT use ngrok in production.
Instead:
- Use real HTTPS domain
- Configure webhook there
Solid apps are built with presets, which optimise your project for deployment to different environments.
By default, npm run build will generate a Node app that you can run with npm start. To use a different preset, add it to the devDependencies in package.json and specify in your app.config.js.