javascript - Change the URL of node server -
I just deployed my first There is URL on the site now. However, I would like to be it How can I do this? With Express (4x) you can do this for example: Now, AngularJS app using Heroku The following is the node script below.
var gzippo = require ('gzippo'); Var Express = Required ('Express'); Var app = express (); an app. Use (gzippo.staticGzip ("+ + __dirname +" ")); App.listen (process.env.port || 5000);
// Announce your router var router = express.Router (); // Define your router router.get ('/', function (rieke, ridge) {// your stuff}} // define other routes and so on ... // ... And make sure that all your routes will be prefixed with the Beta app. ('/ Beta', router);
http://project.herokuapp.com/beta is the main path, and the other path always
/ beta
Comments
Post a Comment