Using nodemon when you press start

i want to use nodemon without “npm run start” i want to be able and press start and then i will be running nodemon will still having my project running so when i close my browser the project stops working. Does any body know how to get this to work?
Repl link:

Change .replit (hidden file)

What is the command to start nodemon? Set run in .replit to that

i have that but doesnt work:

entrypoint = "app.js"
modules = ["nodejs-18:v3-20230608-f4cd419"]
hidden = [".config", "package-lock.json"]

channel = "stable-23_05"

run = ["npm run start"]
deploymentTarget = "cloudrun"
ignorePorts = true

I don’t see anything to start nodemon there?

wdym?, first thing under deployment

heres what i have for the package.json:

  "name": "nodejs",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "nodemon --watch . app.js"
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "@types/node": "^18.0.6",
    "bcrypt": "^5.1.0",
    "body-parser": "^1.20.2",
    "ejs": "^3.1.8",
    "express": "^4.18.2",
    "jsonwebtoken": "^9.0.2",
    "node-fetch": "^3.2.6",
    "nodemon": "^3.0.1",
    "passport": "^0.6.0",
    "passport-jwt": "^4.0.0",
    "passport-local": "^1.0.0",
    "uuid": "^9.0.0"

unless im suppost to put nodemon --watch . app.js in run idk what you mean.

First thing under deployment is npm run start, though?

Also, are you deploying the Repl?

1 Like

no, but does [deployment] even have anything to do with the replit deployments?

… yes???

[deployment] changes what happens when you deploy, ofc…

so where do i do it then… :confused: ?

Replace line 1 with run = "command to start nodemon"

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.