GithubHelp home page GithubHelp logo

teamcodestream / codestream-server Goto Github PK

View Code? Open in Web Editor NEW
64.0 13.0 36.0 48.52 MB

License: Other

JavaScript 93.98% Shell 1.30% Python 0.50% HTML 0.29% CSS 0.56% Dockerfile 0.08% TypeScript 0.19% Handlebars 3.09% Roff 0.01%

codestream-server's Introduction

CodeStream Backend Services

On the backend (aka. the server-side), CodeStream runs a number of services to provide all the functionality needed for the clients. The default development environment will use the codestream broadcaster with outbound mail disabled.

Development Setup with docker-compose

Prerequisites

  1. Mac or Linux computer using zsh or bash.

  2. Docker Desktop which we'll use to provide MongoDB.

  3. Make sure you are authenticated with vault!, i.e.

newrelic-vault us login -method=okta username=<username> totp=<otp>

  1. If you plan to enable outbound email, make sure you have a working AWS session to the CodeStream development account. If this requires use of the AWS_* environment variables and you plan to launch from the debugger, ensure they're defined in the appropriate block in .vscode/launch.json.

Installation

For local development we use docker compose to only run mongodb. You will need to run the api-server locally via your IDE or command line.

  1. Clone and setup faker-service-gateway. Faker service gateway will handle SSL and proxy requests to the api-server.

  2. Clone the codestream-server repo.

  3. Start up the docker container for MongoDB via docker compose.

    docker compose up mongodb -d
    
  4. Install dependencies

    npm run install:all
    

Mongo upgrade caveat

If you have been running mongodb 4 in docker compose you will need to delete the mongodb volume to get a clean start for mongodb 5, otherwise mongo will exit shortly after startup. This will delete all the data in your local docker mongodb instance.

docker compose down --volumes
docker compose up mongodb -d

With a fresh database you will need to run ./start-api-server.sh -init-db-only before being able to run api-server from the IDE.

Method 1 - launch from shell and run natively

  1. Setup and start up the api-server without docker. The default behavior is to initialize the database and disable outbound email queueing.
    ./start-api-server.sh [-init-db-only | -no-db | -enable-mailout | -mock-mode ]
    

Method 2 - launch from IDE

  1. Review the pre-reqs above to ensure you set any additional vars needed for your use case. .vscode/launch.json has some comments to help.

  2. Select any of the the api_srv.js run configurations from vscode or jetbrains.

Point your CodeStream extension to https://localhost.newrelic.com:12079. You should be able to login and see o11y.

Develop to your heart's content!!!! We love pull-requests.

Run everything in docker

Not working right now :(. Check back later.

Running Tests

As usual, make sure you are authenticated with vault.

Start the api server - use -mock-mode flag if needed

./start-api-server.sh [-init-db-only | -no-db | -enable-mailout | -mock-mode ]

In a separate terminal, source testMode.sh (this will also set CS_API_MOCK_MODE=1)

. ./testMode.sh

then run the tests

cd api_server
npm run test

codestream-server's People

Contributors

angieyeh avatar bcanzanella avatar calvinallen avatar cstryker avatar darkpicnic avatar dependabot[bot] avatar dsellarsnr avatar eric-j avatar jimmyjayp avatar kjoshi31 avatar marcelofarias avatar planteater avatar ppezaris avatar purplexa avatar reneelpetit avatar snyk-bot avatar willmiraglia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.