Skip to content

temple-acm/site

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Temple ACM Site

Temple ACM's site is built off of the MEAN stack, which uses Javascript/JSON at every layer (browser, server and database). The technologies involved are MongoDB, Node.js, Express, and AngularJS.

Getting Source

To download the source code of the website, you'll need to fork this repository. That way, when you make changes you can submit a pull request to update the actual website.

git clone [email protected]:/<YOUR GITHUB USER NAME>/site

Prerequisites

  • UNIX Development Environment (OSX, BSD, Linux) - If you're on Windows, your best bet is to use a VM. Try this guide
  • Node.js - Download and install Node.js
  • Make - The make command must be installed manually on some distros (e.g. for Debian-based Linux distributions you need to sudo apt-get install build-essential)

Tools Prerequisites

  • Bower - Web package manager:
$ npm install -g bower
  • Gulp - Streaming build manager:
$ npm install -g gulp

Running the Site

The fastest way to get started with the MEAN stack is to clone the project from your forked repo and utilize it like this:

Install dependencies:

$ npm install
$ bower install

Use gulp to start the server:

$ gulp

Then open a browser and go to:

http://localhost:3000

OR, if you are on Windows, and therefore running the server in a VM, replace 'localhost' with IP address of the VM.

Production Setup

In production we change a few fundamental aspects of our deployment:

  • Mongo DB, our database, is run locally on the same box as the web server instead of being hosted by Compose
  • We use environment variables for sensitive information instead of the development defaults
  • We use HAProxy for reverse proxying and HTTPS configuration

The variables we use are as follows:

  • TUACM_LOGPATH - The path where logs will be stored
  • TUACM_PORT - The port that the web server is listening for HTTP requests on
  • TUACM_SESSION_SECRET - The secret used for salting session tokens
  • TUACM_MONGO_URL - The connection string for mongo

To set up the environment variables in ideal fashion for production, decrypt env.sh.gpg with gpg: gpg env.sh.gpg. Once you have decrypted the environment script, run env.sh to setup environment variables for production:

$ chmod +x env.sh
$ source env.sh

Following this, you need to compile production ready versions of our assets using the gulp build tool:

$ gulp deploy

To manage and query our data, we use Robomongo.

To automatically rebuild and redeploy our production website when we make changes to the source upstream, we utilize Github webhooks and a specialized gulp task:

$ gulp githook

Questions?

Come and ask for assistance or just hang out in our Slack channel. Use @group to notify everyone in the group of your message.

Credits

Inspired by the great work of Madhusudhan Srinivasa, and made possible by the good people at linnovate. Also thank your brogrammer-in-chief Sandile Keswa. Also also thanks to DevOps superhero Sri Ramanujam.

License

(The MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

The Temple University ACM website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •