https://github.com/interfiber/snowfall.ts
Snowfall.ts is a modern http library for deno
https://github.com/interfiber/snowfall.ts
deno denoland http
Last synced: about 2 months ago
JSON representation
Snowfall.ts is a modern http library for deno
- Host: GitHub
- URL: https://github.com/interfiber/snowfall.ts
- Owner: Interfiber
- License: mit
- Created: 2021-02-19T17:56:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-25T12:51:05.000Z (about 4 years ago)
- Last Synced: 2025-04-06T06:13:34.997Z (about 2 months ago)
- Topics: deno, denoland, http
- Language: TypeScript
- Homepage: https://www.interfiber.dev/projects/snowfall
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snowfall.ts
Snowfall.ts is a modern http library for deno## Installing
To install snowfall first create a deno project with a typescript file inside. Then paste the following import statment into the file
```typescript
import { SnowfallServer } from "https://deno.land/x/[email protected]/lib/snowfall.ts";
```## Basic App
Heres some example code for a basic app
```typescript
import { SnowfallServer } from "https://deno.land/x/[email protected]/lib/snowfall.ts";
const app = new SnowfallServer({
EnablePlugins: true,
Port: 8090,
UrlNotFoundMessage: "Yo dawg, that url does not exist!"
});
app.AddRoute("GET", "/", () => {
return "Yo.";
});
app.StartHTTPServer();
```
Make sure to run this file with the ```--allow-net``` flag to allow it access to the network. Then go to ```http://localhost:8090``` and you should get Yo. On the screen!