1.0.14 • Published 12 months ago

@relate/web v1.0.14

Weekly downloads
28
License
GPL-3.0
Repository
github
Last release
12 months ago

@relate/web

The Neo4j WEB package.

Table of Content

Installing

Run these commands to install and start the Relate web server.

$ npm install -g @relate/web
$ relate-web start

Note: You need to create and activate an environment before starting the server. Check the install section in the CLI package to learn how to do that.

By default the server will use port 3000, you can change that port with the PORT environment variable. Example:

$ PORT=5000 relate-web start

Documentation

With the server running you can visit the URLs below to access docs for the schema.

Configuration

By default the server configuration is picked up from the active environment.

A different environment can be specified when running the web module in a Nestjs application by using the defaultEnvironmentNameOrId option.

API Tokens

Enabling API tokens

When creating a new environment, by default the web server will not be secured with API tokens. This is useful for development or for learning, but in production environments or when dealing with sensitive data, we strongly recommend you enable API authentication.

To enable authentication through API tokens on a new environment, use the --apiToken flag when creating the environment through the CLI. Example:

$ relate env:init secure-environment --apiToken

To enable authentication on an existing environment, you can open the environment configuration and set the serverConfig.requiresAPIToken field to true. Example:

$ relate env:open secure-environment
{
  "name": "<environmentName>",
  "type": "LOCAL",
  "serverConfig": {
    "publicGraphQLMethods": [...],
    "requiresAPIToken": true
  },
  "id": "<environmentId>",
}

Generating API Tokens

Generated tokens are valid only for a specific client ID and hostname. The client ID is a name identifying your application, while the hostname is the address where your application is running (if it's hosted) or the address to the @relate/web server.

To generate an API token you can either use the CLI or common package:

# @relate/cli
$ relate env:api-token clientId --hostName http://127.0.0.1:3000

# @relate/common
environment.generateAPIToken('http://127.0.0.1:3000', clientId);

Sending Requests

When sending the request, you'll then need to include the following HTTP headers:

X-API-Token: <API Token>
X-Client-Id: <client ID>
1.0.14

12 months ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.4-alpha.8

2 years ago

1.0.4-alpha.7

2 years ago

1.0.4-alpha.6

2 years ago

1.0.4-alpha.3

2 years ago

1.0.4-alpha.5

2 years ago

1.0.4-alpha.4

2 years ago

1.0.4-alpha.1

3 years ago

1.0.4-alpha.2

3 years ago

1.0.3-alpha.13

3 years ago

1.0.4-alpha.0

3 years ago

1.0.3-alpha.10

3 years ago

1.0.3-alpha.11

3 years ago

1.0.3-alpha.8

3 years ago

1.0.3-alpha.9

3 years ago

1.0.3-alpha.7

3 years ago

1.0.3-alpha.6

3 years ago

1.0.3-alpha.5

3 years ago

1.0.3-alpha.4

3 years ago

1.0.3-alpha.3

3 years ago

1.0.3-alpha.2

3 years ago

1.0.3-alpha.0

3 years ago

1.0.3-alpha.1

3 years ago

1.0.2-alpha.24

3 years ago

1.0.2-alpha.23

3 years ago

1.0.2-alpha.22

3 years ago

1.0.2-alpha.21

3 years ago

1.0.2-alpha.20

3 years ago

1.0.2-alpha.19

3 years ago

1.0.2-alpha.18

3 years ago

1.0.2-alpha.17

3 years ago

1.0.2-alpha.16

4 years ago

1.0.2-alpha.15

4 years ago

1.0.2-alpha.14

4 years ago

1.0.2-alpha.13

4 years ago

1.0.2-alpha.12

4 years ago

1.0.2-alpha.11

4 years ago

1.0.2-alpha.10

4 years ago

1.0.2-alpha.9

4 years ago

1.0.2-alpha.8

4 years ago

1.0.2-alpha.7

4 years ago

1.0.2-alpha.6

4 years ago

1.0.2-alpha.5

4 years ago

1.0.2-alpha.4

4 years ago

1.0.2-alpha.2

4 years ago

1.0.2-alpha.3

4 years ago

1.0.2-alpha.1

4 years ago

1.0.2-alpha.0

4 years ago

1.0.1-alpha.4

4 years ago

1.0.1-alpha.2

4 years ago

1.0.1-alpha.3

4 years ago

1.0.1-alpha.1

4 years ago