You've found the source code for our community website: http://www.montrealelixir.ca. You lucky devil! 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 (do it!)
These instructions will get you a copy of the application up and running on your local machine for development and testing purposes.
See Hosting and Deployment for notes on how to deploy the application on a live system.
You have three options for your development setup:
- Gitpod: Ephemeral Development Environment
- Local Docker-based: Setup in a Docker container
- Bare-metal: Setup directly on the OS (to be documented)
Prerequisites:
Steps:
git clone https://github.com/montrealelixir/website
cd website
make app.config
# Configure the access keys, see: "Setup External API Access Keys" below
make
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).
-
Go to https://apps.twitter.com/.
-
Create New App.
-
From the created app page, go to "Keys and Access Tokens" tab.
-
Create Access Token.
-
(Optionally) change app permissions to Read Only (montrealelixir app only reads tweets from user's timeline).
-
Put the generated keys in your
env
file. -
Start the server locally:
make app.console
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.
-
Go to the Credentials page.
-
Hit "Create" and Proceed with creating new project.
-
Hit "Create credentials" > API key.
-
Put the generated key in your
env
file. -
From project's dashboard hit "Enable APIs and Services", search for YouTube Data API and enable it.
-
Start the server locally:
make app.console
The landing page should contain the 3 latest videos from the ElixirMontreal channel.
To run the tests:
make app.test
To view the application with your browser visit:
make app.console
http://localhost:4000
Other helpful commands:
# Execute any command against the application container, change CMD
make app.do CMD='mix test'
# Start the docker container
make docker.start
# Stop the docker container
make docker.stop
# To stop and remove all volumes (including sync volume)
make docker.clean
See ops/README.md
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix
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.
The application can be deployed to Heroku. If you wish to deploy your own instance of this application, you can use the handy deploy button below.
This application is licensed under the MIT License - see the MIT-LICENSE.md file for details.