Skip to content
This repository was archived by the owner on Sep 8, 2026. It is now read-only.

Latest commit

 

History

53 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[ IN PROCESS... ]


Requeriments:

system compiler extra
linux g++ -pthread flag

Latest changes

  • now you can render cpp code embedded in html files
  • add: post, put, deletex, patch, head, options, link, unlink and purgue with x-www-form-urlconded, geturl, plain/text params each one of them
  • added POST and PUT routes with x-www-form-urlencoded and plain/text

how to get and clone


$ git clone https://github.com/scyth3-c/Magnetar.git

$ git submodule init

$ git subodule update
 

compile and use

  make:
  
    $ cd magnetar-core
    $ make 
    $ ./binary
    

all examples work

a preview of my web server, intuitive and easy to use

well, I wanted to make public the whole process/growth of this project, it is a web server in c++ whose requirements are to have g++ and linux only, currently, only attends GET and others requests but in the future I will expand little by little, it has several functions to make it more familiar as other web servers such as express in Node.js, it has a familiar syntax and I plan to insert existing modules that I uploaded previously as "addons" but I will try as much as possible not to add things to it. as much as possible not to add things that require something else like curl etc. to make it easier to use, here below you will find some screenshots of how it works. documentation is in process and if you want to collaborate do it without any fear, you can talk to me directly, my contact information is at at bohorquez.tech


html view render examples

hmtl

temp

cpp

How to

the functions passed to the routes as the parameters to HEADERS and JSON are Infinite!!! the best way to learn is by testing, you can compile the examples with g++

routes examples:

you can see that it's not so wordy, which is the point of this project, but I still have to improve some things... well let's take a look!


one

the parameters are quite flexible, I have inserted several paths for the sake of convenience


par

implement callbacks functions to the response methods and like a normal lambda function get its environment by reference by adding & between the [] to access the entire scope


call

there are also middlewares, functions that we can add to control the route, they are infinite you can add as many as you want but you must add in next() to get to the next function or it will return that one.


middlewae

Files, you can send the content of files directly


files

but there are things to improve, for example json processing, it is still incomplete.


json

Recomendacion

there are still many other functions like the headers or the return system, so I recommend you to take a look at the examples

performase

idle

RAM CPU read / write
2 MB 0.0 N/D-N/D

responding

RAM CPU read / write
2MB 0.0 N/D-N/D

Extra

Español

bueno, queria hacer publico todo el proceso/crecimiento de este proyecto, se trata de un servidor web en c++ cuyos requisitos son tener g++ y linux nada mas,actualmente, solo atiende peticions GET pero en en futuro ire ampliando poco a poco, tiene varias funciones para que sea mas familiar como otros servidores web como express en Node.js, tiene una sintaxis familiar y planeo inscrustarle modulos ya existentes que subi anteriormente como "addons" pero tratare lo mas posible de no agregar cosas que requieran de algo mas como curl etc. para que sea mas facil de usar, aqui abajo econtraran algunas capturas de como funciona, la documentacion esta en proceso y si quieres colaborar hazlo sin miedo alguno, puedes hablar conmigo directamente, mi informacion de contacto esta en bohorquez.tech

About

2022 - alpha zero - web server, intuitive and easy to use, writte in C++

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages