Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@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
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.