Git Product home page Git Product logo

embedded_files_server_deno's Introduction

Embedded Files Server in Deno

A small utility to create a binary embedding a static website/webapp and a webserver to serve it.

Was my proof of concept before doing it in Rust (https://github.com/DuredhelFinceleb/embedded_files_server), but I thought I'll publish it anyway.

Useful for example if you need to run a webapp on any machine without having to copy the files & setup a webserver.

Instead, just copy the binary and launch your browser.

The server is always launched on localhost.

By default, it listens on port 3000. This can be changed at runtime using the '--port' command line argument. This means you can run multiple instances of the same website/webapp.

Under the hood it uses:

Executed with:

  • deno 1.16.2

Tested with

  • Ubuntu 20.04
  • WSL running Ubuntu 20.04
  • Windows 10 Pro 21H1

How to install

Clone this repo.

Run the build script with the path of the folder to embed Under Linux

chmod +x ./build.sh
./build.sh <path_to_folder_to_embed>

Under Windows:

.\build.cmd <path_to_folder_to_embed>

The binary will be into the same folder as the build script & named 'embedded_files_server' (or 'embedded_files_server.exe' on Windows). It can be renamed and moved freely. Just run it. The '--port' command line argument will be accepted to change the port from the default 3000.

embedded_files_server_deno's People

Contributors

duredhelfinceleb avatar

Stargazers

netop://ウエハ avatar

Watchers

 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.