This guide provides a brief overview of how to set up the starter code for the Rocket.Chat App. We will use this project during our App Development workshop.
Before you begin, ensure you have the following:
- Rocket.Chat server set up and running. We will provide a server during the workshop.
- Linux OS or WSL with Node.js installed.
- The Rocket.Chat Apps CLI installed. You can install it using npm with the command
npm install -g @rocket.chat/apps-cli
. - The starter code is already set up. Follow the below steps to set up the starter code.
-
Clone this repo:
git clone https://github.com/abhinavkrin/app-workshop-welcome-bot.git
-
Install the dependencies:
npm install
-
Edit
app.json
: Every Rocket.Chat app has a unique ID. To set this, you will need to replace the value in theid
field of yourapp.json
file with a unique UUID.- Obtain a UUID from UUID Generator and replace the
id
field in yourapp.json
with this UUID.
Example
app.json
snippet:{ "id": "YOUR-UNIQUE-APP-ID", "name": "Your App Name", "description": "What your app does", ... }
Replace
YOUR-UNIQUE-APP-ID
with the UUID you obtained. As a result each of you will have an app with unique app id. - Obtain a UUID from UUID Generator and replace the
-
Edit
GetInfo.ts
: Since, each slash command is unique, we cannot havemore than one slash command with same command string. EditslashCommands/GetInfo.ts
export class GetInfo implements ISlashCommand { public command = "getinfo-YOURNAME"; ... async executor(...): Promise<void> { } }
Replace
YOURNAME
with your name. As a result, each one of you will will have a unique slash command. -
Check Setup and Confirm Seat Run a check if everything has been set up correctly:
npm run check-setup
If everything is set up correctly you can see a message like this:
Visit the link and fill the form to confirm your seat. ๐ฅณ
With the project starter code configured, follow us along in the workshop to develop the app.
After developing your app, you can deploy it to your Rocket.Chat server for testing and use. Use the Rocket.Chat Apps CLI to package and deploy your app:
rc-apps deploy --url <url-of-rc-server> --username <username> --password <your-password>
Username and password will be provided during workshop
The final code could be found in the final
branch
The credentials will be shared during workshop
Please share your issue in the Events Channel.
Yes. For best experience during the workshop, It is highly recommended that you have set up the starter code.
See you in the workshop! Don't forget to fill feedback form which will be provided at the end of the workshop.