How do I choose custom port to run server?
aroraayush opened this issue · 1 comments
aroraayush commented
const simples = require('simples');
const server = simples(); // Your server is set up on port 80
// Serve static files located in the folder "static"
server.serve('static');
I wish to run the server on my specific port number. How do I do so?
micnic commented
If you want to use another port just use const server = simples(12345);
, instead of 12345
you can put any valid port number. By the way, now I'm developing version 0.9.0
which has some changes related to the static files serving, please read the github repo documentation (not npm).