component

command module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
component
Server-side Go components
Server-side Go components
demo
Component demo application
Component demo application
demo/sqltest
Go database/sql test driver
Go database/sql test driver
static
Component static files
Component static files
util
Component helper functions
Component helper functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL