Replies: 3 comments 8 replies
-
That repo was an experimental version that never made it into Remix. The thing is that Remix doesn't care about your server file. You run that separately from The simplest is to add "dev:node": ".... ./server.ts"
|
Beta Was this translation helpful? Give feedback.
-
Getting server.js to place nice with the rest of remix is imo a pretty basic need. I followed the tutorial to set up socketio with remix and it worked except I could not import any ts module (all my remix app is ts) into server.js. Long story short, one of the answers in this SO thread referred to tsx and it worked like a charm. Now my dev script reads like: |
Beta Was this translation helpful? Give feedback.
-
Hi, I am trying use custom express server for my app. When the app is created with the express template, it creates a
server.js
. Rest of my project is written in TS and i want to be able to import some of those modules in my server file...My question is how do I turn
server.js
intoserver.ts
?Things I have tried:
serverEntryFile
config which doesn't seem to exist anymore. Doing everything else works when I build the project but in dev mode,remix dev
still falls back to remix-app-server.server
config to./server.ts
and putcreateApp(...).listen(...)
inside that. But with thatremix dev
gives this error:Error: remix dev is not supported for custom servers.
Please help 🙏. I am stuck. All I want to do is run some logic before the server starts.
Beta Was this translation helpful? Give feedback.
All reactions