please feel free to make issues and pull requests on github!
installation: npm i easyexpresshoster -g
const Server = require("@eggsnham07/easyexpresshoster")
const server = new Server
server.dir = process.env.EEHDIR || process.cwd
server.port = 5000
server.start()
You can use server.usePrettyUrls()
to make /page.html become /page and if /page is a dir then /page.html will be redirected to /page/
, also server.post
or server.get
work like express's express().post or express.get
if you are using this for the first time you should see something like this:
> eeh start 80
First time setup starting...
Completed!
Server listening on http://localhost:80
Press CTRL + C to stop
otherwise you wise you will see:
> eeh start 80
Server listening on http://localhost:80
Press CTRL + C to stop
If you do not want to use the default pages directory then you can add 'current' at the end of the command to use the terminal's current directory
all pages can found and edited in C:\Users\you\Documents\EasyExpressHoster\Pages
or /home/you/Documents/EasyExpressHoster/Pages