Skip to content
An Express.js app to browse and serve static files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
etc/www
template
.gitignore
README.md
context.js
handler.js
index.js
localServer.js
package-lock.json
package.json

README.md

jstatik

An Express.js app to browse and serve static files

Quickstart

npm --save install giuliojiang/jstatik
var express = require("express");
var jstatik = require("jstatik");

var app = express();
var context = jstatik.createContext();
context.setRootDirectory("/my/content/folder");
app.use("/", jstatik.createApp(context));

app.listen(3000, () => {
    console.info("Listening on port 3000");
});

Replacing /my/content/folder with the directoring that you want to serve. An absolute path is required.

Navigate to http://localhost:3000 to see see the website.

You can’t perform that action at this time.