1.0.91 • Published 7 days ago

@nxn/boot v1.0.91

Weekly downloads
45
License
ISC
Repository
github
Last release
7 days ago

Tutorial : using nxn-boot

NB. DO NOT INSTALL THIS GIT PACKAGE ON YOUR PC. Unless you need to modify the framework itself, there is no need to install the git project. You'll see below how to use it from npm.

Overview

NXN is a framework for small to large scale applications, supporting configuration file, services, routes, express middleware, client data.

Small to very large applications, battle tested.

The main difference with other node.js frameworks are :

Framework

  • pure javascript based,
  • all components are simple classes : no heavy library to learn. Only one class to derive from (optional)
  • injections of components for modular architecture,
  • each component benefits from its own configuration (parameters)
  • all services, routes, models etc. are described in a YAML config (also generated with the CLI)

Medium code

  • message/ node based architecure can be used for data processing chains (ex. indexing for AI, or other jobs)
  • generation of 80% of the code : you just have to write code for your business logic

Quality and documentation

  • jsdoc based with type checking enabled by default : benefit from types and ts typs without compiling
  • documentation of the project generated in mermaid format.

Base components for creating REST API

  • Routes : for creating REST controllers,
  • Services : for doing actual work ("providers"),

Routes and services are simple classes with optional "init()" functions. These classes are listed in a YAML file and loaded by nxn at boot time.

see sample below...

Install

Install @nxn/boot cli nxg from npm:

npm install -g @nxn/cli

init the project:

nxg init

and install dependencies:

npm install

This creates following file structure:

Basically: index.js loads the application config_default.yml and initialises all components. Then it runs express (default server here).

##Run the generated sample:##

Run the sample:

node index.js

or

npm start

You should then see :

The application is then up and running.. It doesnt do much right now but everything is ready. Have a look on the config file and you'll see sections where routes, services, run, tests anf middleware will be listed.

Docker

Just to make sure Dowker is also ready to go, create the image and run it:

npm run docker
npm run docker:run

You should then see the image running as well if Docker is installed on your workstation.

NEXT >> Sample

1.0.91

7 days ago

1.0.90

7 days ago

1.0.89

14 days ago

1.0.88

19 days ago

1.0.87

29 days ago

1.0.86

1 month ago

1.0.84

1 month ago

1.0.85

1 month ago

1.0.83

1 month ago

1.0.79

2 months ago

1.0.80

2 months ago

1.0.82

2 months ago

1.0.81

2 months ago

1.0.77

2 months ago

1.0.78

2 months ago

1.0.76

2 months ago

1.0.75

2 months ago

1.0.74

2 months ago

1.0.73

2 months ago

1.0.72

2 months ago

1.0.71

2 months ago

1.0.69

2 months ago

1.0.70

2 months ago

1.0.66

3 months ago

1.0.65

3 months ago

1.0.64

3 months ago

1.0.68

3 months ago

1.0.67

3 months ago

1.0.62

3 months ago

1.0.61

3 months ago

1.0.60

3 months ago

1.0.63

3 months ago

1.0.59

3 months ago

1.0.58

3 months ago

1.0.57

3 months ago

1.0.56

3 months ago

1.0.55

3 months ago

1.0.54

3 months ago

1.0.50

3 months ago

1.0.53

3 months ago

1.0.52

3 months ago

1.0.49

4 months ago

1.0.48

7 months ago

1.0.47

9 months ago

1.0.46

1 year ago

1.0.45

1 year ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.40

2 years ago

1.0.41

2 years ago

1.0.39

2 years ago

1.0.38

3 years ago

1.0.36

3 years ago

1.0.34

3 years ago

1.0.33

3 years ago

1.0.29

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago