environments
environments copied to clipboard
Add NEW Typescript Environment with Bun version 1.1.40
Typescript Runtime Env without Transpiler
Install Environment:
fission env create --name bun --image ghcr.io/danhtran94/bun-env --builder ghcr.io/danhtran94/bun-builder
Usage:
zip fn-momentprint.zip momentprint.ts package.json
fission package create --env bun --name=fn-momentprint --src fn-momentprint.zip
fission function create --env bun --name fn-momentprint --pkg fn-momentprint --entrypoint "momentprint"
fission function test --name fn-momentprint
momentprint.ts
import momentpackage from "moment";
import type { Request, Response } from "express";
export default (context: { request: Request; response: Response }) => {
return {
status: 200,
body: "Hello " + momentpackage().format(),
};
};
package.json
{
"name": "momentprint",
"devDependencies": {
"@types/bun": "latest",
"@types/express": "^5.0.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {
"moment": "^2.30.1"
}
}
Target Refs #402 #277
Getting exec /builder: exec format error
is this working ?
@bdjafer i got one locally running with bun but uses its native API for server.ts part im thinking about submitting a PR once my .NET #425 goes thru
@davidchase in the end I managed to get a minimal deno env working, but i'd be curious to have a look at your PR on bun