The official Montreal Elixir community website
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
apps Updated to match credo rules May 3, 2018
config fixes #42, Follow the 12-Factor methodology to set configuration in ENV Apr 13, 2018
.credo.exs Resolve style violations Jun 27, 2017
.env.sample Enhance the README following PR comments Apr 14, 2018
.formatter.exs Updated to match credo rules May 3, 2018
.gitignore Enhance the README following PR comments Apr 14, 2018
.travis.yml Upgrade to elixir 1.6.4 Mar 25, 2018
CONTRIBUTING.md Add section on Naming May 5, 2018
MIT-LICENSE Add MIT License Jun 2, 2017
PULL_REQUEST_TEMPLATE.md
README.md Mark shell session examples as 'sh-session' rather than 'shell' May 5, 2018
app.json Update elixir buildpack sha Mar 27, 2018
docker-compose.yml Enhance the README following PR comments Apr 14, 2018
elixir_buildpack.config Upgrade to elixir 1.6.4 Mar 25, 2018
mix.exs Enforce mix format on CI and provide base formatter config May 2, 2018
mix.lock Update outdated packages Mar 4, 2018
phoenix_static_buildpack.config Configure for Heroku May 7, 2017

README.md

Welcome to the Montreal Elixir Community website

Build Status

You've found the source code for our community website: http://www.montrealelixir.ca. The website is a single-page application aggregating several of our online properties:

The application is built using:

  • Elixir: a dynamic, functional language designed for building scalable and maintainable applications, and
  • Phoenix Framework: a productive web framework that does not compromise speed and maintainability.

The website has three main purposes:

  • Promote the Elixir community in Montreal
  • Inform the community members about events and new content
  • Provide an opportunity to learn about Elixir and Phoenix by contributing to an open source project

Getting started

These instructions will get you a copy of the application up and running on your local machine for development and testing purposes. The instructions below provide a recommended path for setting up the application, however an alternative suggestion is offered for those more experienced.

See Hosting and Deployment for notes on how to deploy the application on a live system.

Prerequisites

We assume you have the following installed:

PostgreSQL

You also need to install PostgreSQL.

Recommended

Setup PostgreSQL using a Docker container with docker-compose:

$ docker-compose up -d

Alterative

Install PostgreSQL directly on your development machine using your operating system’s package manager.

Configuration

The application's configuration follows the Twelve Factor methodology, which means they are stored in the environment.

Copy the .env.sample file to the appropriate format for the tool of your choice. You may use source, direnv, nv or a custom script of your own.

Run the website

After you have cloned the repository:

  1. Install dependencies.
$ mix deps.get
  1. Create and migrate your database.
$ mix do ecto.create, ecto.migrate
  1. To get the Twitter and YouTube content, configure external API access keys.

  2. Install Node.js dependencies.

$ cd apps/montreal_elixir_web/assets
$ npm install
  1. Start Phoenix endpoint.
$ cd ../../..
$ mix phx.server

Now you can visit http://localhost:4000 from your favourite browser.

External API access keys

Twitter

Montreal Elixir website depends on twitter feed to deliver recent tweets from @montrealelixir. To enable it in development, you will need to create an app in your own twitter account.

The following steps assume you already have a working twitter account that has email and mobile phone number confirmed (Twitter does not generate API keys if these prerequisites are not met).

  1. Go to https://apps.twitter.com/.
  2. Create New App.
  3. From the created app page, go to "Keys and Access Tokens" tab.
  4. Create Access Token.
  5. (Optionally) change app permissions to Read Only (montrealelixir app only reads tweets from user's timeline).
  6. Put the generated keys in your env file.
  7. Start the server locally:
$ mix phx.server

The landing page should contain the latest tweets from the configured account. If you tweet something new and it should appear on the web page.

YouTube

  1. Go to the Credentials page.
  2. Hit "Create" and Proceed with creating new project.
  3. Hit "Create credentials" > API key.
  4. Put the generated key in your env file.
  5. From project's dashboard hit "Enable APIs and Services", search for YouTube Data API and enable it.
  6. Start the server locally:
$ mix phx.server

The landing page should contain the 3 latest videos from the ElixirMontreal channel.

Running the tests

Ensure the test database was created:

$ MIX_ENV=test mix ecto.create
  • Run the tests
$ mix test

You can also use the mix_test_watch package to automatically run the tests after you save a file:

$ mix test.watch

Learn more about Phoenix Framework

Contributing

The application is built by our community members like you. If you wish to contribute please review our CONTRIBUTING.md to help you get started. If you have never contributed to open source before, How to Contribute to Open Source is good resource to read first. If you need some extra help to get started, please reach our to the community organizers and members. We are here to help.

Hosting and Deployment

The application is deployed to Heroku. If you wish to deploy your own instance of this application, you can use the handy deploy button below.

Deploy

License

This application is licensed under the MIT License - see the MIT-LICENSE.md file for details.