Git Product home page Git Product logo

devex's Introduction

License

BCDevExchange Application

The BCDevExchange is a platform that provides new ways for British Columbia's public sector to connect with developers and other IT professionals.


Table of Contents


Contribute

We are open to pull requests. Please read our contributing guidelines. If you are making a pull request, please refer to our pull request template.

Development

Requirements

Node.js (at least 8.0, but 11+ is recommended) Global install of npm and/or yarn modules

Environment Setup

If you are running the application directly on your machine (not in a container), make a copy of the file sample.env at the root of the project, and rename it to .env. Replace the appropriate values in your copied file. The .env file should never be committed to GitHub or shared publicly.

Ensure you fill in appropriate values for the GitHub fields. This will enable GitHub OAuth in the application. For more information on how to do this, please refer to https://auth0.com/docs/connections/social/github. You will need to use http://localhost:3000 for both the Homepage URL and the Authorization callback URL.

If you are running in the Docker container using the dev.sh bash script, you will need to update these environment variables in that script instead of creating the .env file.

Launching Devex

To get started, run the following command from the root of the devex directory to set things up the first time:

$ ./setup.sh

This will start a Docker container running mongo and build a new image for the application code. If you already have an instance of mongo running then you will likely get errors. Make sure to shutdown your local mongo instance or run it on a port other than the default 27017.

Once setup has finished you can run the application with:

$ ./dev.sh

This will launch a Docker container and open a terminal into the running container where you can run the containerized application in development mode with:

$ npm run dev

Alternatively, if you do not want to run the application in a docker container, you can install the dependencies locally with:

$ npm install

and then execute npm run dev from a terminal on your machine. If you are running the application outside of the container, ensure you have manually launched the MongoDB Docker container using docker start db_devex (the dev.sh script will do this for you if you use this method).

Note that if you are running the application locally, you will need to have Node.js 8.0 or higher installed on your machine.

You should now be able to run the application by entering "http://localhost:3000" in your browser.

If you wish to build and run the application in production mode you can do so with:

$ npm run prod

Notes

When running in development mode, the application will use livereload on port 35729 to automatically load and refresh any changes to client side modules. nodemon is used to automatically transpile and restart the Node server on changes to server side modules.

On some older machines, the livereload option causes performance/overheating issues. You can still run in development mode without the livereload enabled by using npm run quiet instead of npm run dev.

By default, the DEVEX_PROD environment variable is set to false, and the MONGO_SEED environment is set to true. This will cause local user accounts to be seeded into the database for development purposes. These accounts have default passwords specified in environment variables (either via dev.sh or .env).

If the DEVEX_PROD environment variable is set to true, the development accounts will not be seeded. An admin account will be created and will use the password specified in the ADMINPW environment variable.

To use the GitHub OAuth login, you'll need to set up a GitHub Client ID and Secret (see environment setup)

Copyright and License

Code and documentation copyright 2016-2019 the BC Developers' Exchange. Code released under the Apache License, Version 2.0.

devex's People

Contributors

agehlers avatar andrewwhitehead avatar asanchezr avatar ccoldwell avatar cgat avatar chadfawcett avatar crochcunill avatar dependabot[bot] avatar dewolfe001 avatar georgewalker avatar kvangorp avatar mark-a-wilson avatar melavo avatar mvoorberg avatar plasticviking avatar rstens avatar scchapma avatar sheaphillips avatar stevechapmanbcdx avatar sutherlanda avatar tiago-graf avatar wiebo-troost avatar

Watchers

 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.