https://github.com/uditdc/nnapp
https://github.com/uditdc/nnapp
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uditdc/nnapp
- Owner: uditdc
- Created: 2024-03-01T11:08:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T07:40:58.000Z (about 2 years ago)
- Last Synced: 2025-02-16T06:45:39.013Z (over 1 year ago)
- Language: TypeScript
- Size: 193 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nnApp
**nnApp** is a Go package that provides a basic structure for building applications using the Blockless Network (B7S) framework. It includes functionalities for initializing, configuring, and running a Blockless Node.
## Installation
To use this package in your project, you can import it with the following:
```go
import "github.com/blocklessnetwork/nnApp"
```
## Usage
### Creating an App Instance
To create a new instance of the App structure, use the NewApp function, providing a name for the app:
```go
app, err := nnApp.NewApp("your-app-name")
if err != nil {
// handle error
}
```
### Configuring the App
The configuration is loaded from command-line flags. Customize the flags according to your requirements. Additionally, you can configure the logging level with the zerolog package.
```go
// Parse configuration flags
app.B7sConfig = nnApp.parseFlags()
// Configure zerolog with desired level (optional)
app.logger = zerolog.New(os.Stderr).With().Timestamp().Logger().Level(zerolog.DebugLevel)
```