Registry / http-networking / cloudcms-server

cloudcms-server

JSON →
library3.2.353jsnpmunverified

The `cloudcms-server` package provides a robust Node.js application server framework specifically designed to integrate with Cloud CMS deployments. It offers core server-side functionalities, including request routing, error handling, view engine support (e.g., Handlebars), and a flexible storage mechanism. This storage mechanism can utilize local file systems, Amazon S3, or S3FS for managing application content, configuration, and temporary data. The current stable version is 3.2.353, indicating a mature and actively maintained project. It serves as the foundational backbone for the application server tier of Cloud CMS, typically hosted at cloudcms.net, enabling developers to build and deploy applications that deeply leverage Cloud CMS's Web Content Management (WCM) capabilities. Key differentiators include its deep, purpose-built integration with the Cloud CMS platform, highly extensible configuration options for various storage backends, and a pluggable architecture that allows for custom functions at different stages of the request lifecycle.

npm install cloudcms-server
INSTALL
IMPORT
SIG · CLOUDCMS-SERVER
C
cloudcms-server
http-networkingjavascriptv3.2.353
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cloudcmsServer
✓ import cloudcmsServer from 'cloudcms-server';
✗ import { cloudcmsServer } from 'cloudcms-server';
The primary entry point is likely a default export, providing the main server object. While CommonJS `require` is also supported, ESM is preferred for modern applications.
start
✓ const cloudcmsServer = require('cloudcms-server'); cloudcmsServer.start(config);
✗ import { start } from 'cloudcms-server';
The `start` method is invoked on the main server object obtained from the module's default export, not as a named export directly from the package root.
Server Configuration
✓ const config = { /* ... */ };
✗ const config = require('./config.json');
While configuration can be loaded from a file, the server expects a JavaScript object directly for its `start` method. Ensure the object structure matches the server's expectations.

This quickstart initializes and starts a `cloudcms-server` instance with a basic configuration, including a custom route and WCM enabled. It demonstrates how to import the server module, define its configuration, and handle startup.

import cloudcmsServer from 'cloudcms-server'; const serverConfig = { "setup": "single", "name": "My Cloud CMS Application", "socketFunctions": [], "routeFunctions": [ async function(req, res, next) { if (req.url === '/') { return res.send('Welcome to your Cloud CMS powered application!'); } next(); } ], "errorFunctions": [], "configureFunctions": {}, "viewEngine": "handlebars", "wcm": { "enabled": true, // Enable WCM features "cache": false }, "auth": { "enabled": true, "providers": {} }, "port": process.env.PORT ?? 3000, "host": process.env.HOST ?? '0.0.0.0' }; async function startServer() { try { const server = await cloudcmsServer.start(serverConfig); console.log(`Cloud CMS Application Server started successfully on port ${server.port}`); console.log('Access it at http://localhost:' + server.port); } catch (err) { console.error('Failed to start Cloud CMS Application Server:', err); process.exit(1); } } startServer();
Debug
Known issues
gotchaThe configuration object, especially `storeEngines` and `storeConfigurations`, is complex and critical for correct server operation. Misconfigurations in paths, types, or credentials for storage can lead to startup failures or runtime errors.
fix
Carefully review the provided configuration examples and ensure all paths are correct for your deployment environment. Validate `accessKey`, `secretKey`, and `bucket` for S3 configurations. Use environment variables for sensitive data.
affects: >=3.0.0
gotchaWhen enabling S3 or S3FS store engines, the underlying AWS SDK (or similar) library is a runtime dependency. While `cloudcms-server` might not explicitly list `aws-sdk` in its `package.json`'s dependencies, you may need to install it manually in your project (`npm install aws-sdk`) to ensure S3 functionality works correctly.
fix
If using S3 storage, run `npm install aws-sdk` (or equivalent for your package manager) in your project to provide the necessary runtime dependency.
affects: >=3.0.0
gotchaMany advanced features like `wcm`, `virtualHost`, `insight`, and `serverTags` are disabled by default in the provided configuration snippet. If you intend to use these features, you must explicitly enable them in your `serverConfig` object.
fix
Check the `wcm.enabled`, `virtualHost.enabled`, `insight.enabled`, etc., flags in your configuration and set them to `true` as required for your application's functionality.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Configuration for store 'oneteam' not found
The `storeConfigurations` block refers to a `storeEngine` name (e.g., 'oneteam') that is not defined in the `storeEngines` block, or a typo exists.
fix
Ensure all store names referenced within `storeConfigurations` exactly match a defined `type` within the `storeEngines` object. Double-check for typos.
Failed to start Cloud CMS Application Server: Error: Missing accessKeyId in config
An S3 or S3FS `storeEngine` is enabled and configured, but the required AWS credentials (`accessKey` or `secretKey`) are missing or empty in its configuration.
fix
Provide valid `accessKey` and `secretKey` within the `config` object for any S3 or S3FS store engines. It is recommended to use environment variables (e.g., `process.env.AWS_ACCESS_KEY_ID`) for these sensitive credentials.
TypeError: Cannot read properties of undefined (reading 'start')
The `cloudcms-server` module was imported incorrectly, resulting in `cloudcmsServer` being `undefined` or not having a `start` method.
fix
For CommonJS, use `const cloudcmsServer = require('cloudcms-server');`. For ESM, use `import cloudcmsServer from 'cloudcms-server';`. Avoid named imports for the main server object.
Upgrade
Version history
3.2.353latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
cloudcms-server — npm install cloudcms-server · libregistry