
Security News
High Salaries No Longer Enough to Attract Top Cybersecurity Talent
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
@relate/web
Advanced tools
The Neo4j WEB package.
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
With the server running you can visit the URLs below to access docs for the schema.
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.
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>",
}
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);
When sending the request, you'll then need to include the following HTTP headers:
X-API-Token: <API Token>
X-Client-Id: <client ID>
FAQs
Web
The npm package @relate/web receives a total of 0 weekly downloads. As such, @relate/web popularity was classified as not popular.
We found that @relate/web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.