A starter template for building Slack apps using Bolt with Prisma in TypeScript
- Bolt v3.12
- Prisma v4.8
- TypeScript v4.9
Use degit to download the repository locally.
❓ What is degit?
degit downloads a copy of git repository with downloading its entire git history.
Install degit globally.
npm install -g degitDownload the latest version
degit utsavdotpro/starter-bolt-prisma-tsRun locally
yarn devBuild app
yarn buildRun build version
yarn startAfter you've started the Bolt app using any of the commands above, run the following to expose your local server to the world.
yarn serveYou will receive a url, for example https://random-words.loca.lt, that you can use directly on Slack. Made possible using localtunnel
Update the port in package.json for the
servescript if you want to use anything other than3000for the Bolt app
Bolt doesn't require a separate Express app but it's good to have to quickly test your APIs locally
Run locally
yarn dev:expressyarn migrate:dev # migrate to dev
yarn migrate:reset # reset DB
yarn migrate:deploy # deploy migrations
yarn prisma:studio # start DB interface
yarn prisma:generate # generate prisma modals
yarn prisma:generate:watch # generate prisma modals on changeproject
|-- prisma ℹ️ schema and migrations
|-- src
| |-- listeners ℹ️ listeners for different event types
| | |-- actions
| | |-- events
| | |-- shortcuts
| | |-- views
| |-- models
| |-- ui
| | |-- modals ℹ️ keep your modal UIs
| | | ℹ️ keep your UI functions
| |-- utils
| | |-- constants ℹ️ keep your constants
| | | ℹ️ keep your util functions
Bolt is basically a NodeJS app and so can be easily hosted on platforms like Heroku.
Deploy for free on Render
- Add the following script in your
package.jsonfile to automatically generate your Prisma models on every install"scripts": { "postinstall": "npm run prisma:generate" }