Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gauravtiwari/vuejs_on_phoenix

Explore Vuejs with Phoenix (same app as vuejs_on_rails)
https://github.com/gauravtiwari/vuejs_on_phoenix

Last synced: 18 days ago
JSON representation

Explore Vuejs with Phoenix (same app as vuejs_on_rails)

Awesome Lists containing this project

README

        

# Vuejs On Phoenix

A port of [vuejs_on_rails](https://github.com/gauravtiwari/vuejs_on_rails) in Phoenix to explore the workflow. Overall, apart from syntactical differences, very little has changed. Checkout the repo, mainly: `/web/` folder and `/lib/migrations`

To start your Phoenix app:

* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.create && mix ecto.migrate`
* Install Node.js dependencies with `npm install`
* Start Phoenix endpoint with `mix phoenix.server`

Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.

## Run distributed nodes locally (out of the box)

Run each command in two separate terminal tabs:

```bash
# First node
PORT=4001 elixir --name [email protected] --erl "-config sys.config" -S mix phoenix.server
# Second node
elixir --name [email protected] --erl "-config sys.config" -S mix phoenix.server
```

Now, if any node goes down (just ctrl+c twice) you will see in the log the other app gets started automatically after timeout.