Getting Started
Set up connection & start server
Last updated
Set up connection & start server
Last updated
Click 'Add apps' in your Slack workspace.
Install the Restsocket Slack app in Slack.
Use Restsocket in the Slack chat window as follows: after registering, logging in, and connecting. Once you register, you can log in and start using it.
As shown above, you can register users, set up the DB connection, and test the REST API through the Restsocket Slack app chat. (The email, Bearer token, and connection information above are fictional. You must use information appropriate for the user for it to work.)
After configuring the connection, you can directly call the REST API at the designated endpoint using the Bearer token.
/register [email]
Get the Bearer token from your registered email
/login [email] [Bearer token]
The Bearer token will be sent to the registered email. Log in using the token that starts with 'Bearer.' This token consists of the word 'Bearer' followed by a space and 43 random characters.
Connect to the database (Start REST API server).
/connect [Host] [Port] [DB user] [DB password] [Database name]
When you run /connect, the Restsocket server will connect to the database, and the server will start immediately.Example
After installing the app, you can execute the following steps in the Restsocket chat window.
(The email, Bearer token, and connection information above are fictional. Please use the user's information.)
After connecting to the database, you can immediately use the REST API.
You can check the list of tables by using the /tables command.
Use it in JavaScript as follows.
By default, you can easily configure REST API calls using the table name and column names.