GithubHelp home page GithubHelp logo

isabella232 / run-time Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intesso/run-time

0.0 0.0 0.0 39 KB

generate runtime configuration for node.js apps.

License: MIT License

JavaScript 100.00%

run-time's Introduction

#run-time

what it does

the intent of this module is to automate, or speed up the deployment of your website or web application.

  • it creates configuration files for nginx and upstart, using forever, to make sure your app get's started when your server starts, and keeps running even after a crash of your app'.

what it does NOT

it does not help you with placing the files on your host. this is up to you. use sftp shipit, git or what ever suits you best.

install

# install globally
npm install run-time -g

help

runtime -h

the subcommands contain help too. here you have got the complete help:

runtime help

  Usage: runtime [options] [command]


  Commands:

    init        initialize configuration files for this web application
    add         add the new configuration to the host
    remove      remove the configuration from the host
    list        list the active configurations
    help [cmd]  display help for [cmd]

  Options:

    -h, --help     output usage information
    -V, --version  output the version number
runtime help init

  Usage: runtime-init [options]

  Options:

    -h, --help                           output usage information
    -c, --command [value]                command
    -x, --exec [value]                   file to execute
    -o, --command-options [value]        command options
    -e, --environment-variables [value]  set environment variable
    -l, --host-name [value]              host (webserver) name
    -h, --host-port <n>                  host (webserver) port
    -p, --app-port <n>                   internal web application port
    -n, --app-name [value]               web application name
    -d, --domain-name [value]            domain name
    -s, --ssl [value]                    Enable https
runtime help add

  Usage: runtime-add [options]

  Options:

    -h, --help  output usage information
runtime help remove

  Usage: runtime-remove [options]

  Options:

    -h, --help              output usage information
    -n, --app-name [value]  web application name

usage

  1. see help for options runtime -h
  2. navigate to your app directory, you wan't to publish. cd <path to your app>
  3. follow the following steps
    • run runtime init <with parameters> to generate the configuration files
    • run runtime add to add the newly created configuration and start the application
    • check the runtime configurations with runtime list
    • check the running apps with forever list
    • if something goes wront check the logfile listed with forever list
  4. to start things manually run start <appName>
  5. to stop things manually run stop <appName> or do forever list and then forever stop <nr>

init (generates configuration files)

with init you can generate the configuration files for nginx and upstart.

the configuration folder .runtime is being created with the needed files.

the configuration itself is stored in the .runtime/configuration.json file.

if needed, you can modify the files manually, before running runtime add.

# simple node example
runtime init -n mynodeapp -d "mynodeapp.com www.mynodeapp.com" -p 3007 -x app.js

# another node example
runtime init -c node -n myapp -d "myapp.com www.myapp.com" -o "[ --myappPort 8080 --myappHost localhost ]" -p 8080  -e DEBUG=* -e NODE_ENV=production -x app.js

# http-server example
runtime init -n mycms -d "mycms.com www.mycms.com" -p 3008 -c http-server -o "[-i -p 3008]"

add

adds and activates the previously stored configuration files for nginx and upstart.

runtime add

remove

if you wan't to remove your app, you can do it of course with this command.

runtime remove
# or with specific appName
runtime remove -n myapp

list

prints out all the active configurations (added with runtime).

runtime list

license

MIT

run-time's People

Contributors

andineck 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.