Git Product home page Git Product logo

echo's Introduction

echo

Codeship Status for LearnersGuild/echo Code Climate GPA Code Climate Issue Count Test Coverage

This is the echo service.

GETTING STARTED

Welcome to Echo.

Before you can run echo you need:

SETTING UP THE ECHO SERVICE

1. Globally install nvm, avn, and avn-nvm.
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
npm install -g avn avn-nvm
avn setup
2. Fork and clone the repository.
3. Setup and run mehserve.

Figure out which port you intend to use and create the mehserve config file:

echo 9005 > ~/.mehserve/echo.learnersguild
4. Set your NODE_ENV environment variable:
export NODE_ENV=development
6. Create a free AWS account:

https://aws.amazon.com

Make a copy of your access key ID and secret access key. You'll need to include these in your environment variables in the next step.

7. Create your .env.development file for your environment.

Take out all comments in your final version. Example:

PORT=9005
APP_BASE_URL=http://echo.learnersguild.dev
REDIS_URL=redis://localhost:6379
RETHINKDB_URL=rethinkdb://localhost:28015/echo_development
# IDM / JWT settings, including session extension
IDM_BASE_URL=http://idm.learnersguild.dev
JWT_PRIVATE_KEY="<get from IDM service>"
JWT_PUBLIC_KEY="<get from IDM service>"
# External API settings
GITHUB_ORG_ADMIN_TOKEN="<GitHub token with permissions in LearnersGuild, GuildCrafts, and GuildCraftsTesting>"
GITHUB_CRAFTS_REPO="https://github.com/GuildCraftsTesting/web-development-js-testing"
S3_BUCKET=guild-development
S3_KEY_PREFIX=db
AWS_ACCESS_KEY_ID=<YOUR_AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<YOUR_AWS_SECRET_ACCESS_KEY>
8. Install dependencies:
npm install
9. Create a development & test databases:
npm run db:create
NODE_ENV=test npm run db:create
npm run db:migrate:up
NODE_ENV=test npm run db:migrate:up

Optionally, seed your development database with test member and project data:

npm run db:copy -- <STATE>

Available STATE options:

  • GOAL_SELECTION (default)
  • GOAL_SELECTION_VOTES
  • PRACTICE
  • REFLECTION

RUNNING THE SERVER

NOTE: you'll need mehserve, idm and this server all running at the same time for things to work.

npm start

Visit the server in your browser:

open http://echo.learnersguild.dev

Start the workers

npm run workers
npm run workers:cycleLaunched

USING THE DEV SLACK INSTANCE WITH YOUR LOCAL ECHO SERVICE

1. Join the dev Slack team by requesting (and accepting) an invitation from a teammate.
2. Configure your dev environment for OUTBOUND calls to the Slack API.

Add the following to your .env.development:

# Slack / command CLI settings
CHAT_BASE_URL=https://slack.com
CHAT_API_TOKEN=<the Slack bot user's OAuth access token. obtain from a teammate or in the Slack team's app settings>
3. Configure your dev environment for INBOUND calls from Slack (for /slash commands).

Add the following to your .env.development:

CLI_COMMAND_TOKEN=<the Slack app's verification token. obtain from a teammate or in the Slack team's app settings>
4. Set up localtunnel and run the slackslash script:
npm install -g localtunnel
npm run slackslash

NOTE: You can ignore this message after starting localtunnel:

your url is: https://slackslash.localtunnel.me

It's not a URL you're meant to visit in the browser directly; it is the URL already configured in the dev Slack team's echo app and where incoming requests for /slash commands are sent. With localtunnel running and configured properly (along with echo, idm and mehserve), when you issue a slash command in a channel in the dev Slack team, the request will be sent to https://slackslash.localtunnel.me and served by the echo service running on your local machine.

CONTINUOUS INTEGRATION

We use Codeship for continuous integration. The following files are responsible for CI configuration:

  • Dockerfile: basic Docker image for the app
  • codeship-services.yml: similar to docker-compose.yml, but for CI
  • codeship-steps.yml: the steps to run on each service for CI
  • app.env.encrypted: encrypted environment vars for the app (e.g., NPM_AUTH_TOKEN)

LICENSE

See the LICENSE file.

echo's People

Contributors

bundacia avatar jeffreywescott avatar tannerwelsh avatar ameliavoncat avatar devonwesley avatar jbchavez19 avatar rae-ralston avatar nicosesma avatar sdweber422 avatar anasauce avatar mantinone avatar jaredatron avatar nodatall avatar shereefb avatar jason00111 avatar ian-deans avatar dianavashti avatar trevorjamesh avatar

Watchers

James Cloos avatar Steve McDonald avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.