简体   繁体   中英

How to deploy my nodeJS application on wildfly server

I have developed server Rest APIs using node and ExpressJS. Now I want to deploy this application on wildfly server so that my Client application can access the APIs.

What is way to achieve this? below is my app.js file.

var express = require("express");
var bodyParser = require("body-parser");
var app = express();

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

var routes = require("./routes/routes.js")(app);

var server = app.listen(3000, function () {
console.log("Listening on port %s...", server.address().port);
});

You can try heroku cloud, it's simple and free untill some limits but it's nice for testing link

If you have vps you can:

  1. Deploy code somewhere for example github
  2. Connect to your serwer by ssh
  3. Install node.js on server
  4. Pull your api code from github
  5. Install app dependencies (npm)
  6. Run app

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM