anton
anton

Reputation: 257

Express application automatic deploy configuration

Let's suppose I have Express application and install it such way:

  1. Clone from git sources of the application
  2. run npm install
  3. Edit app's configuration in /config

What if I want automatically perform some actions on deploy, like default user creation, fill some collections by start data, etc. How can I do that on the most generic way?

And how can I do it without business logics duplication in a kind of deploy.js to be run, if the app is a REST API?

Upvotes: 0

Views: 42

Answers (1)

zup_zup
zup_zup

Reputation: 87

You can initially run a a file like node setup.js.

Once that is complete run the express.js application like so: node app.js.

The setup.js would initialize pre-deploy configurations.

Does that make sense?

Upvotes: 1

Related Questions