Giter Club home page Giter Club logo

env-repl's Introduction

env-repl Clojars Project

A Component that will start/stop REPL servers based on environment variables.

Usage

Clojars: https://clojars.org/worldsingles/env-repl

Leiningen / Boot Dependency:

[worldsingles/env-repl "0.2.2"]

deps.edn:

clj -Sdeps '{:deps {worldsingles/env-repl {:mvn/version "0.2.2"}}}'

Start the REPL with CIDER dependencies (if available), and environment variables defining the PORTs on which you want to run REPL. For example:

DEV_REPL_PORT=6100 REPL_PORT=7100 clj -A:cider

Build and start the Component in the REPL:

(require '[ws.env-repl :as env-repl]
         '[com.stuartsierra.component :as component])

(def system (env-repl/system 'my-repl))
(alter-var-root #'system component/start)

If the CIDER dependencies are not available at runtime, a plain nREPL server will be started instead.

If you do not plan to start a DEV REPL, you do not need the CIDER dependencies. You can always start a Socket REPL:

(defn -main [& args]
  (component/start (component/system-map :repl (env-repl/system))))
REPL_PORT=54321 java -jar path/to/my-uberjar-0.1.0.jar

License

Copyright © 2016-2018 World Singles Networks llc.

Distributed under the Eclipse Public License version 1.0.

env-repl's People

Contributors

seancorfield avatar

Watchers

 avatar James Cloos avatar

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.