Categorygithub.com/nervatura/component
repositorypackage
1.7.12
Repository: https://github.com/nervatura/component.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Nervatura server-side Go components

Coverage Go Report Card GoDoc Release

An easy way to create a server-side component in any programming language

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:

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).