Deploying a donejs app in nodejs server

75 views Asked by At

I am completely new to donejs and created the donejs app using yeoman, and then created a few components. For deploying the application, I ran "node build" and a dist folder was created, which contained a bundles folder and a steal.production.js file.

What is the way to deploy this dist folder over a nodejs server which basically serves the application and also, I dont want any watching in the console, it should basically just start serving over the port, so that the devops can run scripts after that.

build.js

var stealTools = require("steal-tools");

var buildPromise = stealTools.build({
  config: __dirname + "/package.json!npm"
}, {
  bundleAssets: true
});

From the dist folder :

λ ls
bundles/  steal.production.js

Scripts in my package.json file :

 "scripts": {
    "test": "testee test.html --browsers firefox --reporter Spec",
    "start": "donejs grunt && done-serve --port 8080",
    "grunt": "grunt",
    "develop": "done-serve --develop --port 8080",
    "build": "donejs grunt && donejs develop"
  },

After running donejs start :

C:\Users\saljain\Documents\work\statusui\status\status (master)
λ donejs start

> [email protected] start C:\Users\saljain\Documents\work\statusui\status\status
> donejs grunt && done-serve --port 8080


> [email protected] grunt C:\Users\saljain\Documents\work\statusui\status\status
> grunt

Running "less:development" (less) task
>> 1 stylesheet created.

Done.
done-serve starting on http://localhost:8080

It is serving on 8080 but the console is blocked on this, devops team is saying that the console should not be blocked so that they can run scripts after starting the server.

1

There are 1 answers

8
syciphj On BEST ANSWER

I can see a start script, so try out donejs start if everything else is in order.

Here's some more options as well according to their docs:

To test the production build: NODE_ENV=production donejs start

https://donejs.com/Guide.html#production-build