radix-cms 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -0
- package/index.js +15 -0
- package/package.json +11 -0
package/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
\# Radix CMS
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Basic CMS for building custom web applications.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
\## Status: Under Active Development 🚧
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
\*\*Please Note:\*\* This version (`v0.1.0`) is an initial development release and acts as a placeholder to reserve the namespace. A fully working, feature-rich version of the CMS will be uploaded soon.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
\---
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
\## Installation
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Once published, you can install the package via npm:
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
|
|
31
|
+
npm install radix-cms
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
\*(Note: Replace `radix-cms` with your final unique or scoped package name if it changes).\*
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
\---
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
\## Usage (v0.1.0 Placeholder)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
The current version exports a basic HTTP server function to verify your initialization. You can import and launch the server within your project.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
\### Example
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Create an `app.js` file in your project and add the following code:
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
|
|
61
|
+
const { startCMS } = require('radix-cms');
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
// Start the CMS server with optional custom configuration
|
|
66
|
+
|
|
67
|
+
startCMS({
|
|
68
|
+
|
|
69
|
+
  hostname: '127.0.0.1',
|
|
70
|
+
|
|
71
|
+
  port: 3000
|
|
72
|
+
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
\### Configuration Options
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
You can pass an optional configuration object to `startCMS()`:
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
| Property | Type | Default | Description |
|
|
88
|
+
|
|
89
|
+
| :--- | :--- | :--- | :--- |
|
|
90
|
+
|
|
91
|
+
| `hostname` | `string` | `'127.0.0.1'` | The IP address or hostname the server binds to. |
|
|
92
|
+
|
|
93
|
+
| `port` | `number` | `3000` | The port network traffic will use. |
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
\---
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
\## License
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
This project is licensed under the MIT License.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
package/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const http = require('http');
|
|
3
|
+
|
|
4
|
+
const hostname = '127.0.0.1';
|
|
5
|
+
const port = 3000;
|
|
6
|
+
|
|
7
|
+
const server = http.createServer((req, res) => {
|
|
8
|
+
res.statusCode = 200;
|
|
9
|
+
res.setHeader('Content-Type', 'text/html');
|
|
10
|
+
res.end('<h1>Hello, World!</h1>');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
server.listen(port, hostname, () => {
|
|
14
|
+
console.log(`Server running at http://${hostname}:${port}/`);
|
|
15
|
+
});
|
package/package.json
ADDED