-
Notifications
You must be signed in to change notification settings - Fork 0
Using Nodify Headless CMS with Modern FrameworkS
Nodify is a flexible headless CMS that exposes your content through a REST API, making it easy to integrate with frontend frameworks like Angular, React, Next.js, or backend applications like Spring Boot.
This guide will walk you through:
- How to fetch content by node code or slug
- How to retrieve only the content you need
- Best practices for using a reverse proxy
Nodify's REST API allows you to access content in different ways:
If you know the node code, you can directly retrieve the full node, its children, and all associated content.
Example request:
GET /api/nodes/{nodeCode}
If you prefer to fetch using a slug, Nodify will return: . The main node matching the slug . All child nodes . All node content for each node
Example request:
GET /api/nodes/by-slug/{slug}GET https://cms.example.com/api/nodes/by-slug/welcomeIn some cases, you may only need the content itself without extra node information. Nodify supports this via the query parameter:
GET /api/nodes/{nodeCode}?payloadOnly=trueOr by slug:
GET /api/nodes/by-slug/{slug}?payloadOnly=trueThis is particularly useful for lightweight frontend apps where you just want the data for rendering.
⸻
Here are some quick integration examples.
this.http.get<any>(
'/cms/api/nodes/HOMEPAGE?payloadOnly=true'
).subscribe(data => {
console.log(data);
});this.http.get<any>(
'/cms/api/nodes/HOMEPAGE?payloadOnly=true'
).subscribe(data => {
console.log(data);
});useEffect(() => {
fetch('/cms/api/nodes/by-slug/welcome?payloadOnly=true')
.then(res => res.json())
.then(data => console.log(data));
}, []);
WebClient client = WebClient.create("https://cms.example.com");
Mono<String> result = client.get()
.uri("/api/nodes/HOMEPAGE?payloadOnly=true")
.retrieve()
.bodyToMono(String.class);
result.subscribe(System.out::println);For security, caching, and flexibility, it’s highly recommended to call Nodify through a reverse proxy instead of directly hitting the CMS endpoint from your client apps.
Benefits: . the CMS base URL from the public . Apply authentication or rate limiting rules . Cache frequently accessed content . Transform or sanitize responses
** Nginx config:**
location /cms/ {
proxy_pass https://cms.example.com/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}Then, your frontend can call:
/cms/api/nodes/HOMEPAGE?payloadOnly=trueinstead of:
https://cms.example.com/api/nodes/HOMEPAGE?payloadOnly=true. Use node code or slug to fetch full nodes and their content.
. Append payloadOnly=true to get content only.
. Integrate easily with Angular, React, Next.js, or Spring Boot using standard HTTP clients.
. Always route requests through a reverse proxy for security and performance.
With this approach, Nodify becomes a versatile backend for your modern applications.