Sign inSign up

badgerati/pode

By badgerati

•Updated 26 days ago

Pode is a PowerShell framework that allows you to host REST APIs, Web Pages and SMTP/TCP servers

Image
5

10K+

badgerati/pode repository overview

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. Pode also has support for middleware, sessions, and authentication; as well as access and rate limiting features.

⁠Features

  • Can run on *nix environments using PowerShell Core
  • Host REST APIs, Web Pages, 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
⁠Example

This is an example of using Docker to host your Pode scripts, using the examples/web-pages-docker.ps1 example from the examples directory on GitHub. Below is an example Dockerfile to pull down the base container image, copy over the example files and then run the website (assuming this is run from the examples directory):

FROM badgerati/pode
COPY . /usr/src/app/
EXPOSE 8085
CMD [ "pwsh", "-c", "cd /usr/src/app; ./web-pages-docker.ps1" ]

To build and run this, use the following commands:

docker build -t pode/example .
docker run -p 8085:8085 -d pode/example

Navigating to localhost:8085 (or calling curl localhost:8085) and you should be greeted with a "Hello, world!" page.

For more, see the documentation at https://badgerati.github.io/Pode/⁠

Tag summary

Content type

Image

Digest

sha256:d32f88c03…

Size

336.1 MB

Last updated

26 days ago

docker pull badgerati/pode