A
A
Artem2019-02-28 23:48:11
typescript
Artem, 2019-02-28 23:48:11

How to connect expressjs typescript and react?

Hello!
Expressjs can be used as a dev server for webpack using the webpack dev middleware
. What is the right way to include typing for server files in this bundle?
In a nutshell, I would like to use es6 on the back (expressjs) which will give es6 front (react, vue).
In what direction can you move?
Is it correct to collect server files with webpack, then start the server that will collect the front. After all, if so, then on any sneeze in the server files, the entire front will be rebuilt.
Or is it better to have two entry paths in one webpack config: one for the server, the other for the front

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Brezhnev, 2019-03-01
@vanchelo

Try Nest https://nestjs.com/
And here is a Starter example on Nest + React https://github.com/romainbellande/react-nest-ts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question