Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

to_elixir

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

to_elixir

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

to_elixir

to_elixir is a super simple Rails rake task that inspects your existing Rails application and generates a Elixir / Phoenix JSON API.

Install

Add gem :to_elixir to your Gemfile and run bundle install

Usage

rake to_elixir:phoenix APP_NAME=<NAME>

Where <NAME> is the name of your new Elixir app. This will create a folder <NAME> in the root of your Rails application. Simply run the command, wait a tick and then move the resulting folder somewhere else. Enter the new Elixir app and run iex -S mix phoenix.server to boot your Elixir app. Load up your new app at http://localhost:4000/api/<EXISTING_RESOURCE_NAME> and boom; simple json api.

Want your data in that API?

rake to_elixir:timestamps

If you'd like to convert your existing Rails-based DB over to Phoenix just run the above command. This will create a Rails migration that renames :created_at to :inserted_at It can be rolled back (rake db:rollback) and is non-destructive. Update config/dev.exs to point to your migrated Rails DB and viola; data in your simple json api.

FAQs

Package last updated on 01 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc