beakeyz / MelleWS

Melle Web Services, a collection of useful web-based tools and APIs.

Home Page:https://mellemws.my.to

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Website mellemws.my.to

MelleWS

MelleWS is a web platform written in NodeJS and Express.JS. It uses EJS as the view engine.

Info

The different scripts

You may ask, what is the difference between all the .js files, and what do they do?

Here is a list of what the scripts do:

/app.js: All main scripts and functions of MelleWS are handled here, and all pages are registered here.

/bin/www: This is the script from which all of MelleWS is started, as it creates and initializes all HTTP(S) servers. It also handles logging.

/routes/*.js: These are Routers. For more info, see "Routers".

/views/*.ejs: These are actually mostly HTML files, but with server-side JavaScript in them.

/launcher(-prod/loop).bat: These are Launcher scripts to start MelleWS. They can be ignored and don't need much updating, since they're only used to launch MelleWS for the website itself.

Routers

Routers are the scripts which render EJS (dynamic HTML) pages. They are defined in app.js.

HTTP Request handling

Only the /public/ folder is visible to the browser, and if no HTTP requests match the ones defined in app.js, it will look for a file in /public/. If no file is found, it will (as of 0.4) throw a 404 error.

Cloning and running

It is very easy to host MelleWS yourself, to tinker with it or just to have your own server. Below are the steps for cloning this repository and running it for yourself.

Note: Make sure you have the latest versions of both NodeJS and NPM before starting.

First, clone the repo:

git clone https://github.com/MelleNooijen/MelleWS.git

It might prompt you to log in to Git(Hub), as this is a private repository.

Then, go to the folder in which the repository was cloned:

cd MelleWS

If you wish to use nodemon so you don't have to restart after making changes, see the steps below.

npm install -g nodemon

Then, install dependencies:

npm install

(this will get the necessary dependencies from package.json)

And at last, you can start MelleWS:

Linux: (if you chose nodemon)

sudo nodemon --ignore './public/json/' ./bin/www

(if you didn't choose nodemon)

sudo ./launcher.sh

Windows:

launcher

Done!

About

Melle Web Services, a collection of useful web-based tools and APIs.

https://mellemws.my.to

License:GNU General Public License v3.0


Languages

Language:JavaScript 53.2%Language:EJS 41.0%Language:CSS 5.6%Language:Shell 0.1%Language:Batchfile 0.0%