How do I deploy my deno/hono server?
steven-tam
HOBBYOP

a year ago

Since railway doesnt have the same support for deno as node, I went ahead and tried deploying with dockerfile:

FROM denoland/deno:alpine

EXPOSE 8000

WORKDIR /app

COPY . /app

RUN deno cache src/index.ts

CMD ["deno", "task", "start"]

my deno.json which is deno's package.json looks like:

{

"imports": {

"hono": "jsr:@hono/hono@^4.6.14"

},

"tasks": {

"start": "deno run --allow-net src/index.ts"

},

"compilerOptions": {

"jsx": "precompile",

"jsxImportSource": "hono/jsx"

}

}

the only change I made after intializing deno with hono was renaming main.ts to index.ts and moving it into my the src directory I just created. I dont think deno has a build command. This is also my first time using docker

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

2 Replies

steven-tam
HOBBYOP

a year ago

deno 2 is currently unsupported. I ended up using this template https://railway.app/template/zWmKrg


a year ago

Yep that is the template you would want to use!


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...