Skip to content

Simple slash command implementation for searching github repositories in Rust.

Notifications You must be signed in to change notification settings

arazabishov/hexocat-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexocat-bot

Build Status

Simple slash command implementation for searching GitHub repositories in Rust. This repo is a part of the blog post series:

In order to start the development server, use the next command:

# This command will start the Rocket server 
# that will be listening for the post requests 
# on the locahost - 0.0.0.0, port - 2727.  
cargo run

Here is an example of the query using cURL:

curl -X POST \
  http://0.0.0.0:2727/hexocat/ \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'text=retrofit&token=test_token'

If you want to run a server in the production environment you have either to change Rocket.toml file to include extra properties or to expose them as environment variables:

# Prepare release version of the binary.
cargo build --release

# Export required environment variables. 
export ROCKET_ENV=production cargo run
export ROCKET_KEY=your_slack_token
export ROCKET_PORT=2727

# Execute the binary to start server. 
target/release/hexocat-bot

About

Simple slash command implementation for searching github repositories in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages