Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

295
Views
How do I connect an ExpressJS backend to a SvelteKit frontend?

I'm trying to create an app that uses ExpressJS as the backend and SvelteKit as the frontend. Express will be the entry point for the web server, so for example /api/ requests will be routed to ExpressJS and anything other than this will be sent to the SvelteKit frontend.

I'm using the node adaptor for SvelteKit and have found that it makes a fully contained node server in '/build/index.js' for the SvelteKit application.

However, this is where I'm stuck now and I'm not sure how to route the requests to the frontend through the Express app. Any help would be much appreciated. I'd ideally like to have this contained within one project.

Link to the node adaptor: https://github.com/sveltejs/kit/blob/master/packages/adapter-node/README.md

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I think I worked it out! These two lines solve this in the express app:

import { handler } from './build/handler.js';
app.use(handler);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!