Skip to content

A blank, base level Bolt for JavaScript template to install and start an app

License

Notifications You must be signed in to change notification settings

slack-samples/bolt-js-blank-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Bolt for JavaScript Blank Template

This is a blank Bolt for JavaScript template app used to start building new Slack apps.

Setup

Before getting started, make sure you have a development workspace where you have permissions to install apps. If you don’t have one setup, go ahead and create one.

Developer Program

Join the Slack Developer Program for exclusive access to sandbox environments for building and testing your apps, tooling, and resources created to help you build and grow.

Installation

Create a Slack App

  1. Open https://api.slack.com/apps/new and choose "From an app manifest"
  2. Choose the workspace you want to install the application to
  3. Copy the contents of manifest.json into the text box that says *Paste your manifest code here* (within the JSON tab) and click Next
  4. Review the configuration and click Create
  5. You'll be redirected to the app settings page for your app. Click Install App in the left hand menu then Install to Workspace and Allow on the screen that follows.

Environment Variables

Before you can run the app, you'll need to gather some environment variables.

  1. Bot token: Open your app settings page, click OAuth & Permissions in the left hand menu, then copy the Bot User OAuth Token.
  2. App token: Click Basic Information from the left hand menu and follow the steps in the App-Level Tokens section to create an app-level token with the connections:write scope.

Once you have these, export both in a shell for following processes:

export SLACK_BOT_TOKEN=xoxb-example
export SLACK_APP_TOKEN=xapp-1-example

Setup Your Local Project

# Clone this project onto your machine
git clone https://github.com/slack-samples/bolt-js-blank-template.git

# Change into this project directory
cd bolt-js-blank-template

# Install dependencies
npm install

# Run Bolt server
npm start

At this point a message should appear in the terminal that notes the Bolt app is running! It doesn't do much else at the moment.

Linting

# Run lint for code formatting and linting
npm run lint

Resources

To learn more about developing Slack apps, visit the following pages:

About

A blank, base level Bolt for JavaScript template to install and start an app

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 5