Skip to content

Conversation

@danhtran94
Copy link

@danhtran94 danhtran94 commented Dec 18, 2024

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
Screenshot 2024-12-18 at 10 14 28 PM

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

@62316e
Copy link

62316e commented Jan 23, 2025

Getting exec /builder: exec format error

@bdjafer
Copy link

bdjafer commented Jul 31, 2025

is this working ?

@davidchase
Copy link
Contributor

@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

@bdjafer
Copy link

bdjafer commented Aug 20, 2025

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants