
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
geoserver-node-client
Advanced tools

Node.js / JavaScript Client for the GeoServer REST API.
Detailed API-Docs are automatically created with JSDoc.
Compatible with GeoServer
npm i geoserver-node-client
usage with require (ES5):
var grcImport = require('geoserver-node-client');
var GeoServerRestClient = grcImport.GeoServerRestClient;
var url = 'http://localhost:8080/geoserver/rest/';
var user = 'admin';
var pw = 'geoserver';
var grc = new GeoServerRestClient(url, user, pw);
function main () {
grc.about.exists().then(function (result) {
console.log(result);
});
};
main();
usage as ES module (ES6)
import {GeoServerRestClient} from 'geoserver-node-client';
const url = 'http://localhost:8080/geoserver/rest/';
const user = 'admin';
const pw = 'geoserver';
const grc = new GeoServerRestClient(url, user, pw);
async function main () {
const result = await grc.about.exists();
console.log(result);
};
main();
Run as local checkout (mainly for development purposes)
git clone https://github.com/meggsimum/geoserver-node-client
cd geoserver-node-client
npm install
npm run demo
A request either succeeds or throws the custom GeoServerResponseError. It has the standard message property with a "human-readable" text. Additionally the error has the property geoServerOutput which contains the direct response from GeoServer. This output is not guaranteed to exist and can either be a simple text or a complete HTML document. The latter is difficult to read, but might still be helpful for debugging. This example shows how these error properties can be used. It also shows how to filter by error type:
try {
// call any function from this library
await grc.styles.publish(workspace, styleName, sldBody)
} catch (error) {
// the standard error message
console.error(error.message);
// the whole error including stack trace and (if available) the property 'geoServerOutput'
console.error(error);
if (error instanceof GeoServerResponseError) {
// a GeoServer specific error happened
} else {
// another error happened
}
}
First start a test setup using this Docker compose file:
GEOSERVER_VERSION=2.28.0 TEMP_DIR=/tmp/gs docker compose -f test/docker-compose.yml up
Then, in an other terminal, run:
# specify the GeoServer version and run the test suite
GEOSERVER_VERSION=2.28.0 npm run test
Setting a git tag and increasing the version in the package.json as well as releasing to npm is done via release-it.
The GitHub release has to be performed manually based on the tag created by release-it.
This is the workflow for releasing:
GITHUB_TOKEN is available as environment variable. See here for more information.export GITHUB_TOKEN=ADD-YOUR-TOKEN-HERE
npm login
# then enter your credentials
main branch that you would like to release, then run:npm run release
package.jsonYou need professional support, maintenance or project-driven development around geoserver-node-client? Please contact a service provider listed below:
This project was initiated by meggsimum within the mFund research project SAUBER and was further developed in the mFund research project KLIPS.
FAQs
Node.js client for GeoServer REST API
We found that geoserver-node-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.