Redis Cache Layer for the NEU ALIGN Chatbot
- Download and Install Redis
- Install Go.
- Download Go Archive.
- Extract it into
/usr/local
creating a Go tree in/usr/local/go
(Typically these commands must be run as root or through sudo.)- example
tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
- NOTE: To install to a custom location, refer documentaion on official Golang website.
- example
- Add
/usr/local/go/bin
to the PATH environment variable- example
export PATH=$PATH:/usr/local/go/bin
- example
- Set-up the Go working directory structure.
- create a folder in your home directory to house all go source code.
- It is preferable to create the folder in your home directory:
~/go
(where ~ is shortcut to your home directory)
- It is preferable to create the folder in your home directory:
- under that directory, create further three directories
~/go/src
,~/go/pkg
and~/go/bin
- now create the following structure of directories
~/go/src/github.com/rapidclock
and go to that directory. - clone the align-bot-stats-cache repo here. (Final resting place :
~/go/src/github.com/rapidclock/align-bot-stats-cache/
)
- create a folder in your home directory to house all go source code.
- Install dependencies:
go get -u github.com/buger/jsonparser
go get -u github.com/json-iterator/go
go get -u github.com/gomodule/redigo/redis
go get -u github.com/mailru/easyjson/...
- Install the align-bot-stats-cache Application.
- run the command
go install
- run the command
- Start the Redis Server using default .conf file.
- run this command
redis-server
- run this command
- Run the align-bot-stats-cache Application.
- go to
~/go/bin
and run the output file called align-bot-stats-cache as./align-bot-stats-cache
- go to
NOTE :
- The application is running on localhost right now. The set port is 15000.
- Remember to Start the Redis server before starting the applicaton. It requires the redis server to be running.