# Packages
# README
Nervatura server-side Go components
An easy way to create a server-side component in any programming language
Documentation
- Benefits of server-side components
- HTTP request management
- Server-side component events
- Creating a server-side component
- Examples and demo application
- Go package documentation:
Quick start (demo application)
The demo application displays all components with their test data. Applications can store component data in memory, but they can save it anywhere in json format and load it back. The demo application can store session data in memory and as session files. The source code of the example application also contains an example of using a session database (sqlite3, postgres, mysql, mssql). If you want to use a database session, uncomment before importing the database driver you want to use.
1. Prebuild binaries
2. Docker file
- Clone the repository:
git clone https://github.com/nervatura/component.git
cd component
- Docker build
docker build -t component .
- Run the demo application
docker run -i -t --rm --name component -p 5000:5000 -v $(pwd)/session:/session component:latest
3. Build the project
- Clone the repository:
git clone https://github.com/nervatura/component.git
cd component
- Ensure that you have Golang installed on your system. If not, please follow the official installation guide.
- Build the project:
go build -ldflags="-w -s -X main.version=demo" -o ./component main.go
- Run the demo application
./component 5000
The demo application can store session data in memory and as session files or session database:
- open the http://localhost:5000/ (memory session)
- or http://localhost:5000/session (file or database session)
The Nervatura Admin interface of the application is another example of the use of server-side components (session and JWT token, database session and more).