Coder Social home page Coder Social logo

naustin / pode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from badgerati/pode

0.0 2.0 0.0 2.11 MB

Pode is a Cross-Platform PowerShell framework that allows you to host REST APIs, Web Sites, and TCP/SMTP Servers

License: MIT License

Dockerfile 0.07% PowerShell 98.91% JavaScript 1.02%

pode's Introduction

Pode

MIT licensed Documentation AppVeyor Travis CI Gitter

Chocolatey PowerShell Docker

Pode is a Cross-Platform PowerShell framework that allows you to host REST APIs, Web Pages and SMTP/TCP servers. It also allows you to render dynamic files using Pode files, which is effectively embedded PowerShell, or other Third-Party template engines.

Documentation

All documentation and tutorials for Pode can be found here - this documentation will be for the latest release.

To see the docs for other releases, branches or tags, you can host the documentation locally. To do so you'll need to have the Invoke-Build module installed; then:

Invoke-Build Docs

Then navigate to http://127.0.0.1:8000 in your browser.

Build Your First App

Below is a quick example of using Pode to create a single REST API endpoint to return a JSON response. It will listen on a port, create the route, and respond with JSON when http://localhost:8080/ping is hit:

Server {
    listen *:8080 http

    route get '/ping' {
        json @{ 'value' = 'pong' }
    }
}

See here for building your first app!

Features

  • Can run on *nix environments using PowerShell Core
  • Host REST APIs, Web Pages, Static Content, TCP and SMTP server
  • Multiple threads can be used to response to incoming requests
  • Inbuilt template engine, with support for third-parties
  • Setup async timers to be used as one off tasks, or for housekeeping services
  • Ability to schedule async tasks using cron expressions
  • Supports logging to CLI, Files, and custom loggers to other services like LogStash, etc.
  • Cross-state variable access across multiple runspaces
  • Optional file monitoring to trigger internal server restart on file changes
  • Ability to allow/deny requests from certain IP addresses and subnets
  • Basic rate limiting for IP addresses and subnets
  • Support for generating/binding self-signed certificates, and signed certificates on Windows
  • Support for middleware and sessions on web servers
  • Can use authentication on requests, which can either be sessionless or session persistent

Install

You can install Pode from either Chocolatey, the PowerShell Gallery, or Docker:

# chocolatey
choco install pode

# powershell gallery
Install-Module -Name Pode

# docker
docker pull badgerati/pode

pode's People

Contributors

badgerati avatar ssugar avatar

Watchers

James Cloos avatar Noel Austin 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.