Powerful code-server environments for developers and teams
Experience seamless development with our cloud-based code environments. Perfect for remote teams, educational institutions, and individual developers.
NIGHT is a lightweight, flexible PHP framework designed for rapid application development with a focus on API creation, resource management, and asynchronous processing. This framework provides a simple yet powerful structure for building web applications and APIs with minimal configuration.
Discover what makes NIGHT Framework powerful and efficient
Class-based routing system that maps URLs directly to classes and methods with minimal configuration.
Built-in support for JSON API responses with standardized formatting and error handling.
Simple PDO wrapper for database operations with support for CRUD operations and multiple connections.
Load HTML, CSS, and JavaScript content dynamically from resources for modular application development.
Simple file upload and storage management with support for various upload methods.
Asynchronous processing of tasks like emails, notifications, and SMS messages.
Start building with NIGHT Framework in minutes
.config.json
in the project's root directory{
"dbstring": "mysql:host=localhost;dbname=yourdb;charset=utf8",
"dbuser": "username",
"dbpass": "password",
"DEVELOPMENT": true
}
Comprehensive guides to help you build with NIGHT Framework
The framework uses a simple routing system based on class and function parameters in the URL:
https://yourdomain.com/{class}/{function}?param1=value1¶m2=value2
For example:
https://site.com/
calls the index()
method of the site
classhttps://site.com/page
calls the index()
method of the page
classhttps://site.com/app/api
calls the api()
method of the app
classNIGHT makes it easy to create APIs using the openapi
trait:
class api {
use \openapi;
public static function string($data=[]) {
return 'Hello World';
// Returns {"result":"Hello World"}
}
public static function array($data=[]) {
return ["name" => "John", "age" => 30];
// Returns {"result":2,"data":{"name":"John","age":30}}
}
}