Skip to content
On this page

Projects

Projects are the new standard for writing HTTP servers in JS/TS. Each Project is deployed to its own unique URL and ran globally at the network edge. Projects are a convenient yet powerful way to automate API interactions directly from your browser. Powered by the Netzo SDK, projects allow anything from simple workflows to complex automations.

Projects overview

Projects in Netzo are developed using Deno, a simple, modern and secure runtime for JavaScript and TypeScript. Netzo deploys Projects around the world instantly on the click of a button, and runs them closest to users at the network edge.

Using Projects provides the following benefits:

  • Builds on the Web: use fetch, WebSocket, or URL just like in the browser
  • Built-in support for TypeScript and JSX: type safe code, and intuitive server-side rendering without a build step
  • Web compatible ES modules: import dependencies just like in a browser, without the need for explicit installation
  • Extremely fast: deploy in less than a second, serve globally close to users
  • Deploy from URL: deploy code with nothing more than a URL

File Types

The following table gives an overview of the currently supported types of Projects:

TypeContent TypeStatus
TS Filesapplication/typescript
JS Filesapplication/javascript
TSX Filesapplication/tsx
JSX Filesapplication/jsx

Key: ✅ - supported, ⌛ - work in progress, ❔ - in consideration, N/A - not applicable

The file extension of the Project file will determine its content type. These file types will be executed as-is, without the need for a build step. The following file extensions are supported:

.js is JavaScript

Plain and simple vanilla JavaScript with all modern features.

javascript
const Foo = () => {
    return React.createElement("div", null, "Hello World!");
};

.ts is TypeScript

Microsoft's way of adding "concrete" types to JavaScript

typescript
const Foo: FunctionalComponent = () => {
    return React.createElement("div", null, "Hello World!");
};

.jsx is JavaScript but with JSX enabled

JSX is React's language extension to allow you to write markup directly in code which is then compiled to plain JavaScript with the JSX replaced with direct API calls to React.createElement or whatever API is targeted

jsx
const Foo = () => {
    return <div>Hello World!</div>;
};

.tsx is JSX but with TypeScript enabled

Its similar to jsx except it's TypeScript with the JSX language extension

tsx
const Foo: FunctionalComponent = () => {
  return <div>Hello World!</div>
}

Runtime APIs

The following Web and Deno APIs are supported on the runtime.

  • addEventListener
  • Cache
  • Durable Objects
  • Encoding
  • Fetch
  • FetchEvent
  • Headers
  • HTMLRewriter
  • KV
  • Request
  • Response
  • ScheduledEvent
  • Streams
  • Web Crypto
  • Web standards
  • WebSockets
  • eval()
  • new Function()

INFO

To learn more, you can always head over to the Deno documentation

Creating Projects

  1. Head over to the Projects page within a Workspace and click the Create button.

  2. Give a unique name for the project and select a starting template. We'll select the basic TypeScript example for now.

  3. Add the necessary environment variables in the drawer to the right.

Invoking Projects

Projects are invoked via HTTP requests invoke a Project, These can be made either manually (default), on a schedule (soon) or in response to a real-time event (soon).

Deployment

Note that deploying a Project will save its latest changes but won't actually boot the new deployment until invoking it for the first time. Due to this, the first invocation after deployment could take a bit longer, following invocations should be almost instant.

Projects has loaded