npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@jolie/leonardo

v0.4.5

Published

The Jolie Web Server

Downloads

25

Readme

The Leonardo Web Server

This is Leonardo, a web server written in Jolie.

You can use Leonardo as is, to host static files, or as a powerful server-generated pages framework. The implementation of server-generated pages is left to the user, by using hooks (defined as Jolie services). See Fabrizio's website for an example using templates and external services.

Leonardo uses plain HTTP for serving content. To add encryption (HTTPS), we recommend combining it with a reverse proxy (for example, we like linuxserver/letsencrypt).

Start quickly with Docker for static content

If you have Docker installed and you just want to host some static content, using Leonardo is really quick. First, pull the image from Docker Hub: docker pull jolielang/leonardo. Assume that you have your static content in directory myWWW (replace this with your actual directory), then you can just run the following command and Leonardo will start.

docker run -it --rm -v "$(pwd)"/myWWW:/web -e LEONARDO_WWW=/web -p 8080:8080 jolielang/leonardo

Go ahead and browse http://localhost:8080/.

Static content

If you simply want to use Leonardo to host some static content, you can run it as it is.

You just have to tell Leonardo where the static content is located. You can do it in two ways:

  • Pass the content directory as an argument. For example, if your content is in /var/www, then you should run the command jolie launcher.ol /var/www.
  • Pass the content directory by using the environment variable LEONARDO_WWW. In this case, you just need to invoke jolie launcher.ol.

Make a Docker image with your own website

Here is a Dockerfile that creates an image for a website whose content is stored in directory myWWW.

FROM jolielang/leonardo
ENV LEONARDO_WWW /web
COPY myWWW $LEONARDO_WWW
EXPOSE 8080