5.0.0-rc.10 • Published 2 months ago

equipped v5.0.0-rc.10

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Equipped

Installation

This is a Node.js module available through the npm registry. Before installing, download and install Node.js. Node.js 4.2.4 or higher is required. If this is a brand new project, make sure to create a package.json first with the npm init command. Installation is done using the npm install command:

Using npm:

npm install equipped

Using yarn:

yarn add equipped

Using CDN:

Equipped jsDelivr CDN

Basic Usage

Before use, the package must be initialized in the entry point into your application, with the required settings.

import { Instance } from 'equipped'

Instance.initialize({
    isDev: true, // Are you running in a dev environment
    appId: 'testing', // An id to identify your application
    mongoDbURI: 'mongodb://...', // A mongodb url if you want to use a database
    redisURI: 'redis://localhost:6379', // A redis url if you want to use a redis cache. Confirm all other functionality you intend to use do not depend on the cache, even if you are not using a cache directly
    ...other settings
})

After the app has been initialized, the Instance class returns a singleton that provides access to most functionality provided by Equipped

import { Instance } from 'equipped'

const appInstance = Instance.get()

To start a server

import { makeController, StatusCodes } from 'equipped'

// Aggregate all your routes into an array. This can be defined in the file or imported from your controllers etc
appInstance.server.routes = [
    {
        path: '/',
        method: 'get',
        controllers: [makeController(async () => {
            return {
                result: 'Hello world',
                status: StatusCodes.Ok
            }
        })]
    }
]

await appInstance.server.start(8080)
5.0.0-rc.9

2 months ago

5.0.0-rc.3

3 months ago

5.0.0-rc.4

3 months ago

5.0.0-rc.5

3 months ago

5.0.0-rc.6

3 months ago

5.0.0-rc.7

3 months ago

5.0.0-rc.8

3 months ago

5.0.0-rc.10

2 months ago

5.0.0-rc.2

4 months ago

5.0.0-rc.1

5 months ago

5.0.0-alpha.7

6 months ago

5.0.0-alpha.6

6 months ago

5.0.0-alpha.5

6 months ago

5.0.0-alpha.4

6 months ago

5.0.0-alpha.9

6 months ago

5.0.0-alpha.8

6 months ago

5.0.0-alpha.17

5 months ago

5.0.0-alpha.15

6 months ago

5.0.0-alpha.16

6 months ago

5.0.0-alpha.13

6 months ago

5.0.0-alpha.14

6 months ago

5.0.0-alpha.11

6 months ago

5.0.0-alpha.12

6 months ago

5.0.0-alpha.3

6 months ago

5.0.0-alpha.10

6 months ago

5.0.0-alpha.2

6 months ago

5.0.0-alpha.1

7 months ago

5.0.0-beta.8

7 months ago

5.0.0-beta.9

7 months ago

5.0.0-beta.7

7 months ago

5.0.0-beta.11

7 months ago

5.0.0-beta.12

7 months ago

5.0.0-beta.10

7 months ago

5.0.0-beta.15

7 months ago

5.0.0-beta.16

7 months ago

5.0.0-beta.13

7 months ago

5.0.0-beta.14

7 months ago

5.0.0-beta.17

7 months ago

5.0.0-beta-5

7 months ago

5.0.0-beta-6

7 months ago

5.0.0-beta-3

7 months ago

5.0.0-beta-4

7 months ago

5.0.0-beta-1

7 months ago

5.0.0-beta-2

7 months ago

4.4.5

9 months ago

4.4.6

9 months ago

4.4.4

9 months ago

4.4.3

10 months ago

4.4.2

10 months ago

4.4.1

10 months ago

4.4.0

10 months ago

4.3.2

10 months ago

4.3.1

10 months ago

4.3.0

10 months ago

4.2.9

11 months ago

4.2.10

11 months ago

4.2.8

1 year ago

4.2.7

1 year ago

4.2.6

1 year ago

4.2.3

1 year ago

4.2.2

1 year ago

4.2.5

1 year ago

4.2.4

1 year ago

4.2.1

1 year ago

4.2.0

1 year ago

4.1.19

1 year ago

4.1.20

1 year ago

4.1.21

1 year ago

4.1.22

1 year ago

4.1.23

1 year ago

4.1.18

1 year ago

4.1.16

2 years ago

4.1.17

2 years ago

4.1.11

2 years ago

4.1.12

2 years ago

4.1.13

2 years ago

4.1.14

2 years ago

4.1.15

2 years ago

4.1.10

2 years ago

4.1.9

2 years ago

4.1.8

2 years ago

4.0.2-alpha.4

2 years ago

4.1.7

2 years ago

4.1.6

2 years ago

4.1.5

2 years ago

4.1.4

2 years ago

4.1.3

2 years ago

4.1.2

2 years ago

4.1.1

2 years ago

4.1.0

2 years ago

4.0.2-alpha.3

2 years ago

4.0.2-alpha.2

2 years ago

4.0.2-alpha.1

2 years ago

4.0.2

2 years ago

4.0.1

2 years ago

4.0.0-alpha-10

2 years ago

4.0.0-alpha.9

2 years ago

4.0.0-alpha.8

2 years ago

4.0.0-alpha.7

2 years ago

4.0.0-alpha.6

2 years ago

4.0.0-alpha.5

2 years ago

4.0.0-alpha.4

2 years ago

4.0.0-alpha.3

2 years ago

4.0.0-alpha.2

2 years ago