Last active
August 1, 2022 02:13
-
-
Save semlinker/10f603735909258d4320c3c47d469112 to your computer and use it in GitHub Desktop.
HTTP Transfer Large Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Koa = require("koa"); | |
const cors = require("@koa/cors"); | |
const serve = require("koa-static"); | |
const range = require("koa-range"); | |
const app = new Koa(); | |
// register middlewares | |
app.use(cors()); | |
app.use(range); | |
app.use(serve(".")); | |
app.listen(3000, () => { | |
console.log("app starting at port 3000"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment