This is a simple web server that receives requests and prints the body to the console.
Run the server with deno run
$ deno run -A ./bin/server.ts
or run it by deno task
$ deno task start
You can change the port by setting the PORT
environment variable.
$ PORT=8080 deno run --allow-net server.ts
or create a .env
file with the following content:
PORT=8080
compile the server with deno compile
$ make compile
You can run the server with the excutable file inside bin
folder.
$ ./bin/server-{os_arch}
# e.g. For macOS with Apple Silicon
$ ./bin/server-aarch64_apple_darwin