Skip to content

Instantly share code, notes, and snippets.

View jianwu's full-sized avatar
💭
Passionate programmer

jianwu

💭
Passionate programmer
View GitHub Profile
@jianwu
jianwu / static_server.js
Last active February 9, 2023 22:38 — forked from ryanflorence/static_server.js
Node.JS static file web server, also provides CORSProxy, Http/Https proxy function. Put it in your path to fire up servers in any directory, takes an optional port argument. If provide second https port argument, it will also start https. For https to work, need to put key and cert file in the folder.
#!/usr/bin/env node
const { argv } = require('process');
/**
Static http server implemented with NodeJS.
Features:
1. No external dependencies