GithubHelp home page GithubHelp logo

crdschurch / crossroads-phoenix Goto Github PK

View Code? Open in Web Editor NEW
1.0 43.0 0.0 2.95 MB

Use phoenix to serve up https://crossroads.net

Home Page: https://crossroads.net

Elixir 2.47% CSS 10.86% JavaScript 49.99% HTML 36.34% TypeScript 0.34%
phoenix-framework nodejs angular

crossroads-phoenix's Introduction

Crossroads Microclient Implementation in Elixir/Phoenix

Environment Setup

Install the latest stable version of elixir

Follow the guide located on the elixir site.

Install the Phoenix Mix archive

There is a great guide on the phoenix site, but essentially you will just run: $ mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez to install the mix archive.

Install node.js >= 5.0.0

This is environment specific, please visit https://nodejs.org/en/ for instructions on installing on your operating system.

Up and running

  1. Clone the project to your local machine: git clone https://github.com/crdschurch/crossroads-phoenix.git --recursive (The recursive is important!!!!) OR cd crossroads-phoenix && git submodule init && git submodule update. git clone https://github.com/crdschurch/crossroads-phoenix.git

We are trying to move away from git submodules since they can cause too much confusion. We are now using NPM modules.

  1. Check out the master branch in the submodule directory: cd apps/crossroads_interface/web/static/js/angular2-webpack-phoenix/ && git checkout master
  2. Install Phoenix dependencies by running the following command in the crossroads_interface/ directory: mix deps.get

This project is an umbrella project which lets us break it into smaller pieces. The phoenix portion is in the apps/crossroads_inteface directory and probably where you will be working most of the time.

  1. Install javascript dependencies by running the following command in the crossroads_interface/ directory: npm install
  2. Kick of the build and the server: MIX_ENV=dev mix phoenix.server

Windows users will need to run set MIX_ENV=dev and then run mix phoenix.server MIX_ENV=dev is necessary because we need some way to tell the Microclients that we are running in the context of our phoenix application. This way webpack will put our build files in the correct assets folder for phoenix to serve.

Things still left TODO

  • Pull in all tests from the crds-angular repo
  • Find a way to run all tests and submodule tests from the root of the crossroads-interface with NPM and webpack(?)
  • Handle authentication more globally. Maybe the Phoneix server handles it and uses Session storage? Maybe we just create a framework and add it to the example JS repo.
  • Setup the Phoenix app to proxy requests the .NET server.
  • Setup the Phoenix app to proxy CMS request to the CMS Server.
  • Pull in all the latest changes to crds-angular client side codebase.
  • Determine how to reliably route between MicroClients
  • Create a future proof, framework agnostic, shareable header and footer
  • Write a guide for adding/editing a microclient
  • Deployment

crossroads-phoenix's People

Contributors

silbermm avatar mjvcallibrity avatar ingageritters avatar

Stargazers

Richie avatar

Watchers

David Anderson avatar  avatar Adam George avatar Tate Lucas avatar Ben Nash avatar Warren Harrison avatar Brandon Schenz avatar Michael Ball avatar DM avatar Dan avatar James Cloos avatar Aaron Gause avatar Brian Miller avatar Tim avatar Dustin Kocher avatar Becky Blank avatar Ken Baum avatar  avatar  avatar Charlie Retzler avatar Michael Vezzani avatar Sean C Davis avatar Jonathan Horner avatar Samuel Mello avatar Alex Kempf avatar  avatar Michael Saylor avatar  avatar Tosin Ayanrinola avatar  avatar  avatar  avatar  avatar  avatar  avatar Josh Lane avatar  avatar  avatar  avatar WoleOjo avatar  avatar Kim Farrow avatar  avatar

crossroads-phoenix's Issues

Webpack process doesn't exit when stopping application

When running mix phoenix.server and then quitting, the webpack --watch process does not exit.

When running npm run watch and then quitting, webpack exits as expected, so this must be an issue with how mix/iex quits the process.

The two workarounds right now:

  1. Manage the webpack process manually. When quitting mix, also open a process manager and quit force quit webpack.
  2. Comment out the watchers line in config/dev.exs. This won't run webpack as part starting/running Phoenix. Now open a new terminal and run npm run watch in the crossroads_interface directory.

Update README

Currently the README setup walkthrough states that mix deps.get only needs to be run from the top level directory. However, when you navigate into a sub project and try npm install it fails stating that a directory doesn't exist. This is fixed by running mix deps.get in the sub project directory.

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.