This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run from root of freshly cloned 'https://github.com/cloudflare/workers-sdk'. | |
FROM debian:bookworm-slim | |
RUN apt-get update && apt-get -y install npm libc++1 && rm -rf /var/lib/apt/lists/* | |
WORKDIR /app | |
COPY . . | |
RUN npm install | |
WORKDIR /app/packages/wrangler | |
RUN npm install | |
RUN npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const port = process.env.PORT || 4258; | |
const hostname = '0.0.0.0'; | |
let content = null; | |
require('http') | |
.createServer((req, res) => res.end(content)) | |
.listen(port, hostname, () => console.log(`Listening on http://${hostname}:${port}`)); | |
require('readline') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
func unwrapPathError(err error) error { | |
if e, ok := err.(*os.PathError); ok { |