How I Set up Production Node.js Project (2024)

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ธ.ค. 2024

ความคิดเห็น • 12

  • @kocourekkocourek-pq2tm
    @kocourekkocourek-pq2tm หลายเดือนก่อน +1

    Hi Alex, please could you show us how to set up .npmrc file create your own npm package registry with github actions and use in another project.

    • @alexrusin
      @alexrusin  หลายเดือนก่อน

      I have a similar video on creating npm packages. It uses turborepo: th-cam.com/video/SGSCAHVKqmc/w-d-xo.html

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 หลายเดือนก่อน +1

    Great help. Thank You.

  • @madmaxdev
    @madmaxdev 4 หลายเดือนก่อน +1

    Node has --watch flag that is similar to nodemon, so no need for extra dependency. And i think drizzle ORM is pretty good.

    • @alexrusin
      @alexrusin  4 หลายเดือนก่อน

      I don't think it works very well with typescript though, at least with node 20. Yep, that is correct. Drizzle is a good ORM as well. I even have a poll about about ORMs where Drizzle is included: th-cam.com/users/postUgkxHC64JNlrMFwHoB_5jHNTCfAYLh9o4uHS

  • @deepak5074
    @deepak5074 4 หลายเดือนก่อน +3

    I think its time to move biome from eslint for linting. What do you say sir?

    • @alexrusin
      @alexrusin  4 หลายเดือนก่อน +1

      It definitely looks faster than ESLint and Prettier. I gotta check it out.

  • @slooibba0169
    @slooibba0169 4 หลายเดือนก่อน +1

    Thank you !!

    • @alexrusin
      @alexrusin  4 หลายเดือนก่อน +1

      You're welcome!

  • @2005bgva
    @2005bgva 3 หลายเดือนก่อน

    Hi Alex, thanks for video. One question: why do you instal dotenv-cli like dev dependencie and not dependency? if you doen not install like a dependency how know from where to obtain .env configuration?

    • @alexrusin
      @alexrusin  3 หลายเดือนก่อน +1

      When you deploy your app to production you normally will put your env variables into the environment. It really depends where you deploy. If you are using AWS ECS you will put it in your task definition. If you are using docker compose, there's a specific environment property (or you can just put those variables in the Dockerfile as args and populate them during the build time). In some instances you can deploy your app on a server and use PM2, then you can use .env file to for the app to pick up your environment variables. In that case you can update your package.json file to have dotenv-cli as a regular dependency. You will want to create (update) your run script to use dotenv-cli.

    • @2005bgva
      @2005bgva 3 หลายเดือนก่อน

      @@alexrusin Thanks