#process-running #check #detect #railway #railwayapp

bin+lib is-railway

Check if the current process is running inside Railway

2 stable releases

1.0.1 Feb 22, 2022

#19 in #process-running

23 downloads per month

Apache-2.0

7KB

is-railway

Check if the current process is running inside Railway.

GitHub crates.io

Table of Contents

Features

  • Written in Rust
  • Fast and lightweight
  • Uses no dependencies

Installation

You can use the following command to install this package.

cargo install is-railway

Or as a dependency.

# Cargo.toml

[dependencies]
is-railway = "1.0.1"

Usage

Note: When using as a CLI, it exits with code 0 if running in Railway and 2 if not.

Basic Usage

use is_railway::check;

fn main() {
    let is_running_on_railway = check();

    println!("{}", is_running_on_railway);
}

CLI

$ is-railway

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Tomio

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

No runtime deps