express-static-s3
v1.0.4
Published
Loads a web page from s3 bucket and serves it from RAM
Downloads
8
Readme
Express Static S3 Page
Installation
npm install express-static-s3
Usage
//initialize express
const api = express();
//initialize body parser
const bodyParser = require("body-parser");
api.use(bodyParser.urlencoded({ extended: false }));
api.use(bodyParser.json());
//initialize express-static-s3
let staticServer=new ExpressStaticS3({
accessKeyId: 'REDACTED',
secretAccessKey: 'REDACTED',
bucket: 'REDACTED'
});
api.use(staticServer.express);
Page will run entirely out of ram only updating from bucket on boot or when you call the .resync() function. You can use the prefix and folder option perameters to have more then one static page on the same server.