Bug 248877 - www/npm: npm avtostart ?
Summary: www/npm: npm avtostart ?
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-24 11:25 UTC by Aleks
Modified: 2023-09-25 10:58 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleks 2020-08-24 11:25:30 UTC
npm avtostart  ?

did not find documentation how to make autostart 


 cd .. && npm install && npm start

FreeBSD 12.1-STABLE r362880 GENERIC  amd64


npm_enable="yes" ????
Comment 1 Po-Chuan Hsieh freebsd_committer freebsd_triage 2020-09-12 12:16:36 UTC
I don't understand what it means.
Comment 2 Aleks 2020-09-15 09:12:28 UTC
Good afternoon ! I run with pens.

cd .. && npm install && npm start

I wanted to run it myself.

After starting the server
Comment 3 Marcin Cieślak 2023-09-25 10:58:52 UTC
Here is what you can do:

- let's assume your project is in /home/project directory
- you need to run "npm install" only once:


  (cd /home/project && npm install)

- probably you want to run your project as some user (say "myuser") and not root.

- after this you can add the following to the /etc/rc.local file:

  (cd /home/project && su myuser -c "npm start")

hope this helps!