Skip to content

pyhoon/pakai-server-b4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pakai - Web API Server framework

Version: 4.00

Create REST API Backend using B4J project template

Preview

Pakai


Template:

  • Pakai Server (4.00).b4xtemplate

Depends on:

Features:

  • Use Server Handlers
  • Improved API documentation
  • Built-in web front-end with CRUD examples
  • Supports JSON and XML formats payload and response

Code Example

Private Sub GetCategoryById (id As Int)
	DB.Initialize(Main.DBType, Main.DBOpen)
	DB.Table = "tbl_categories"
	DB.Find(id)
	If DB.Found Then
		HRM.ResponseCode = 200
		HRM.ResponseObject = DB.First
	Else
		HRM.ResponseCode = 404
		HRM.ResponseError = "Category not found"
	End If
	ReturnApiResponse
	DB.Close
End Sub

Support this project