Skip to content

WasixXD/Galleon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

34 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

A minimal web development framework for NodeJS

Check the docs

import Galleon from "galleonjs"

const ship = new Galleon() 
const PORT = 3000 || process.env.PORT

ship.get("/", (server) => {
    server.send("AHOY") 
})

ship.listen(PORT, _ => console.log(`Server running at http://locahost:${PORT}`))

Brief ๐Ÿ“–

This is a attempt to make a ExpressJS clone without any package (PS: i used one)

Challenges ๐Ÿข

  • Use NodeJS default library
  • Work with request and response handler
  • Send different types of data through the web

Goals ๐Ÿ†

  • [ x ] Can setup a server
  • [ x ] Can respond to GET and POST methods
  • [ x ] Send multiple files such as html, jpeg, css, js, json
  • [ x ] has different functions to handle a application

How it works? ๐Ÿ’ผ

It uses the node:http library to create a server and through events can handle HTTP methods

How to install ๐Ÿš€

Be sure to use Node >= v18.12.1

> npm i galleonjs@latest

PS: AHOY!