~tychi/servo

25133899ed21c1d5e46bca60cc533d8f5e88ba83 — Tyler Childs 5 months ago c128c9a main-boot2web4you
patch: add boot2web4you ware
3 files changed, 66 insertions(+), 0 deletions(-)

M .gitignore
M README.md
A boot2web4you
M .gitignore => .gitignore +5 -0
@@ 71,3 71,8 @@ layout_trace*

# Package managers
etc/taskcluster/macos/Brewfile.lock.json

# boot2web4you
deno/
destination
run-application

M README.md => README.md +15 -0
@@ 1,3 1,18 @@
# boot2web4you

a bootable web server and web client with minimal dependencies. Compatible with any POSIX compliant system that is capable of running rust and optionally deno for a built-in web server.

To get started, install rust and follow the servo instructions below.
For the optional web client, install deno then run ./boot2web4you

For a demo, please visit: https://ncity.executiontime.pub

----
ooo
@TYCHI00
ooo
----

# The Servo Parallel Browser Engine Project

[![Linux Build Status](https://img.shields.io/travis/servo/servo/master.svg?label=Linux%20build)](https://travis-ci.com/servo/servo)  [![Changelog #228](https://img.shields.io/badge/changelog-%23228-9E978E.svg)](https://changelog.com/podcast/228)

A boot2web4you => boot2web4you +46 -0
@@ 0,0 1,46 @@
#!/bin/sh

mkdir -p deno

echo '
import { createApp, serveStatic } from "https://deno.land/x/servest@v1.3.1/mod.ts";

const app = createApp();
app.use(serveStatic("./destination"));

app.listen({ port: 8000 });
' > deno/index.js

mkdir -p destination

echo '
<!doctype html>
<html lang="en">
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<style>
			html, body { margin: 0; padding: 0; overflow: hidden; }
			body { display: grid }
		</style>
	</head>
	<body>
		Your device has initialized successfully...
		<br /><br />
		Time to party in 3... 2... 1...
		<noscript>
			<a href="http://tychi.me/">http://tychi.me</a>
		</noscript>

		<script>
			window.setTimeout(function() {
				window.location.href = "http://tychi.me/"
			}, 3000)
		</script>
	</body>
</html>
' > destination/index.html

deno compile -A --allow-net --allow-run --allow-read --unstable --output=run-application ./deno/index.js

./run-application &
./mach run http://localhost:8000/index.html