Does Netzo offer static file hosting?

Learn how you can host your project's static files with Netzo.

Gabriel Romero
Written by Gabriel RomeroLast update 5 months ago

The Netzo API will automatically host a project's static files (e.g. .ts, .jsx, .md) in the following URL:{projectId}/{...path}, so for example:

  •{projectId}/mod.ts (at root)

  •{projectId}/src/components/Table.tsx (deep)

  •{projectId}/ (markdown docs)

will all be served with the appropriate "content-type" header for Deno or the browser to understand. Note private packages require providing an apiKey as a search param to the URL. So projects in Netzo don't necessarily have to be "executable" by having an entry-point (e.g. main.ts) which calls Deno.listen (or equivalent serve functions). They can also be used as normal repositories for storing your code! (FYI a GitHub integration is planned)

Why should you care?

  • 🚀 simply import/export anything from its module URL to re-use code across your projects

  • 🔗 forget about having to publish to a package manager like npm, just import from the module's URL

  • 📁 files can also be (asynchronously) read using e.g. await Deno.readTextFile(""), even .wasm files can be loaded!

Did this answer your question?