Our great sponsors
-
Nodemon.io
Monitor for any changes in your node.js application and automatically restart the server - perfect for development
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Now, we’ll set up an express server and see how we can use the node-cron package; you can find the project repository here. The first step is to create an express server. To do this, we’ll create an "express-cron" folder and initialize a node application with this command:
The nodemon package from the above command will automatically restart the server when file changes are detected. Once we’ve added the required packages, we’ll add scripts to package.json.
Related posts
- Set up Hot Reload for Typescript ESM projects
- Guia para Iniciantes: Criando uma API com Node.js, PostgreSQL e Padrão MVC
- Best ways to fix Nodemon error- nodemon.ps1 cannot be loaded because running scripts is disabled on this system.
- Nodemon not watching for file changes
- I want to see changes to my code in real time