Nadira
Nadira

Reputation: 1

How to run/view the existing project powered by KeystoneJS on the browser?

I need to upgrade a website and the website is powered by KeystoneJS. I've given a folder of the website containing all the folders (models, node_modules, public, ...) and the problem is how do I run/view the existing project on the browser? Help me please... :(

Upvotes: 0

Views: 246

Answers (1)

FitzFish
FitzFish

Reputation: 8629

You should have a keystone.js or maybe index.js as the entry point. Look in this file.

Inside you should find the keystone init call. Change the host and port properties in it by respectively 'localhost' and 80.

keystone.init({
    // Bunch of other options
    host: 'localhost',
    port: 80,
});

Then run node yourentrypoint.js.

Now the website should be accessible in your browser on default HTTP.

It's assuming that you are running this on local and that no other program uses the port 80.

  • If you are on a web server, then replace 'localhost' by the IP of the server, as a string.
  • If another program already uses port 80, change it, but note that if you want the website to be available as default HTTP, you should either cancel this other program, or use a reverse proxy such as ngix.

Upvotes: 2

Related Questions