Simple Docker, Node, & TypeScript Setup | Code Hot Reloading While Running a Docker Container

preview_player
Показать описание
Addressing a common issue I've run into of compiling my TypeScript projects when running them in Docker containers.

This setup allows us to code in development while having our code hot reload in the container, as well as having a production step in the docker build that compiles our code to serve the built application.

Prefer written? A step by step blog post on DEV can be found here:

If you want your portfolio or resume reviewed, send them here:

For 1-1 coaching/consulting in software development, book here:
Рекомендации по теме
Комментарии
Автор

Thank you so much for this helpful tutorial. I followed the textual explanation on Dev. It worked like a charm.

PhilipLafeber
Автор

for those who cant hot reload on windows, try adding the -L tag on the nodemon dev script, making it "nodemon -L src/index.ts"

maiconmoreira
Автор

Great refresher video for node typescript and docker

litan
Автор

Great video! I would definitely like to see part 2 or more of these.

waseemahmed
Автор

I love this, please make the part 2 video!

Dapito
Автор

Very helpful. Would be interested in seeing a DB (mongo?) and pushing the container to kubernetes.

kenlane
Автор

Gem. really well explained and informative up to date video. It helped a lot thanks a lot, keep doing those! Maybe don´t hit the keyboard so hard in future videos ;)
Maybe do a short follow up on converting this boilerplate to vs code remote-containers

Kodingi
Автор

i dont know why hot reloading is not working on my system, im trying since 3 days, to get it working

akibkhan
Автор

Unfortunately it doesn't work like this using nodemon on Windows :(

dasten
Автор

Hey! Great tutorial, how would the process look like for using vue cli 4 and typescript i

islandpenguin
Автор

Nice guide, it was quite helpful but somehow it doesn't reload at all in Docker Desktop :/ Is there any way to see the changes in the console without using the desktop app ?

sakreth
Автор

Its not working for me. I even tried cloning your repository to see if I did something wrong and yours isn't working on my system either. Is there a docker setting that needs to be configured. I'm running docker for windows.

raine-works
Автор

Help me! I'm follow your guide but my app is not hot reload

tieulinh
Автор

Hey, when you record a video, the microphone should not be in the other room

padrello
Автор

Good video!!
1) If your in the comments and using windows stop and switch to mac or linux, why anyone uses windows nowdays is beyond me.
2) COPY package*.json ./ in your dockerfile to include the lock in the cached jobs
3) RUN npm run build - runs the build, doesn't start the app, is that what was wanted? Make up just builds the docker-compose, i think?

Jrrs
visit shbcf.ru