1.0.0 • Published 10 months ago

@scaratek/server v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Server

Simple Express Server

Example

const Server = require("@scaratek/server"); // Imports the Module

const host = "0.0.0.0"; // Host
const port = 3000; // Port

const dir = "public"; // Directory to Serve
const route = "/" // Route on Server

Server.Route(dir, route); // Routes the Directory

Server.Serve(host, port); // Runs the Server

Documentation

  • Server.Route(*directory*, *route*) - Will Serve a Directory to a Route
  • Server.Serve(*host*, *port*) - Will Start a Server
1.0.0

10 months ago