Comments (5)
@mrkurt how does fly make a response with HTML? is there any way besides just passing it as text like below?
fly.http.respondWith((req) =>
new Response("<h1>Hello World</h1>", { status: 200})
)
Edit
I realized I can just do fetch("file://foo.html")
from fly.
Yep! The only caveat is that you need to send a content-type
header as well, or browsers don't really know what to do with it:
let res = await fetch("file://foo.html")
res.headers.set("content-type", "html")
return res
from fly.
I have a bit of a caching app example here. Don't mind constructive feedback, first go at it: #75
from fly.
Gonna replace this with specific app example ideas.
from fly.
lol
from fly.
Related Issues (20)
- Continuous Deployment with Buildkite HOT 3
- Running Varnish on Fly HOT 2
- Secured API Key generation on the edge with Fly HOT 2
- Continuous deployment + [Various] HOT 2
- Continuous deployment with CircleCI HOT 8
- Continuous Deployment with Travis HOT 13
- Continuous Deployment using Github Actions HOT 1
- Continuous Deployment with Codeship HOT 1
- Continuous Deployment with Buddy.works HOT 1
- Using OpenResty for Authentication on Fly HOT 6
- JS renderer on fly HOT 20
- Text summarizer (based on BERT) as a service/API on fly HOT 10
- Data[base|store]s & Fly HOT 11
- Redis cache cluster HOT 3
- Web app firewall HOT 1
- Rust on Fly
- GraphQL at Edge HOT 1
- hands-on docs bug
- allow exposing multiple port range in machines API and fly.toml
- Machine API V2 and region add does not scale as expected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fly.