User:daviduniart/sandbox
Appearance
nervex web server nervex | |
Developer(s) | Holdplex Inc. |
---|---|
Initial release | 6 September 2014 |
Stable release | 0.3.1
|
Written in | Ast and C++ |
Operating system | Linux, Microsoft Windows, Mac OS X |
Website | holdplex |
nervex (NRV) is an intelligent high-performance web server. The word "nervex" comes from the word "vagus nerve", also known as cranial nerve x (or CNX). nervex combines a web server with artificial intelligence that modifies your web pages intelligently to save bandwidth, correct coding mistakes and generate cross-browser compatible code. nervex is the only web server that fully support C++ inside HTML. It is available for use with a Holdplex Service Server.
Features
[edit]
- C++ server-side scripting inside html files.
- Load Balancing.
- IPv6 Support
- Auto CSS compilation for cross-browser compatibility.
- Auto (Memory-Caching, Indexing, Server Health Check).
- Compression & Decompression.
- Integrated advanced Scripting language for configs, url rewriting and user management (Ast).
- Bandwidth throttling.
- Coding mistakes notifications.
Innovation
[edit]
nervex is the first intelligent web server. It is also the first web server to fully support C++ inside HTML files. nervex was mainly created to manage, update and improve sites to make web development more efficient and faster.
Development
[edit]
- 2009 Research & Development Round 1
- 2009-2010 Basic Web Server
- 2010-2011 HTTP Protocol Compliance
- 2010-2011 HTTPS Support
- 2010-2011 C++ Integration Start
- 2011-2012 Artificial Intelligence Support
- 2011-2012 Bandwidth throttling Support
- 2011-2012 Cross-Browser Compatibility Manager (CSS, HTML)
- 2011-2012 Site Speed Manager
- 2012-2013 Research & Development Round 2
- 2013-2014 C++ Integration Complete
- 2013-2014 Ast Programming Language Integration
- 2014-2015 Very active development
Scripting Examples
[edit]
<cpp> and <cout>
[edit]<cpp_begin>
#include <iostream>
void printsomething()
{
cout<<"Hello Plexers!"<<std::endl;
}
</cpp_begin>
<!doctype html>
<html>
<cpp>
std::string Page_Title = "nervex webpage";
</cpp>
<head><title><cout>Page_Title<<" test"</cout></title></head>
<body>
<cpp>
for(int i = 0; i < 5; i++)
{
</cpp>
<p style="font-size: 16px;"><cout>"#"<<i<<":"</cout><cpp>printsomething();</cpp></p>
<cpp>
}
</cpp>
</body>
</html>
<cpp_include>
[edit]<cpp_begin>
#include <iostream>
</cpp_begin>
<!doctype html>
<html>
<cpp_include>content/header.cpp</cpp_include> //header.cpp contains a variable named var1
<body>
<cpp>
<cout>var1</cout>
</cpp>
</body>
</html>
GET, POST and FILES
[edit]<!doctype html>
<html>
<head><title>Testing GET, POST and FILES</title></head>
<body>
<cpp>
if(GET.find("var_get"))
{
cout<<GET["var_get"]<<std::endl;
}
if(POST.find("var_post"))
{
cout<<POST["var_post"]<<std::endl;
}
if(FILES.find("var_file1"))
{
for(size_t i = 0; i < FILES["var_file1"].size(); i++)
{
cout<<"Upload #"<<i<<":"<<FILES["var_file1"][i].Name<<std::endl;
}
}
</cpp>
<form action="/" method="GET">
<input type="hidden" name="var_get" value="it works(GET)!">
<input type="submit" value="Send GET">
</form>
<form action="/" method="POST">
<input type="hidden" name="var_post" value="it works(POST)!">
<input type="submit" value="Send POST">
</form>
<form action="/" method="POST" enctype="multipart/form-data">
<input type="file" name="var_file1" multiple>
<input type="submit" value="Upload File(s)">
</form>
</body>
</html>
Bandwidth throttling
[edit]In Script
[edit]<!doctype html>
<cpp>
Connection.SetMaxDownloadSpeed(250000); //Bytes per second
Connection.SetMaxUploadSpeed(100000); //Bytes per second
</cpp>
<html>
<head><title>Slow down!</title></head>
<body>
<cpp>
//Send data as much as you want
</cpp>
</body>
</html>
In Request Config File (AST)
[edit]ulongint MaxDownloadSpeed = 250000;
ulongint MaxUploadSpeed = 100000;
if(SubDomain == "www")
{
Redirect301(Domain);
}
if(FileRequested == "bigfile.jpg")
{
Connection.SetMaxDownloadSpeed(MaxDownloadSpeed);
Connection.SetMaxUploadSpeed(MaxUploadSpeed);
}
if(Country == "United States" || Country == "Canada")
{
Connection.SetMaxDownloadSpeed(500000);
Connection.SetMaxUploadSpeed(150000);
}
SetResponseFile(404, "error.cpp");