This is the minimum configuration required for noonjs — just a single collection like todos, users, people, products, and so on.
{
"collections": {
"todos": {
"schema": {
"title": {
"type": "string"
}
},
"permissions": {
"*": true
}
}
}
}
With this, everyone has access to todos collection and can perform create, read, update, and delete operations.
Restart the server after modifying config.json
In this example, additional options are included in the configuration, such as auth, CORS, IO, limiter, and more.
{
"debug": "app:*",
"limiter": {
"window": 60000,
"limit": 100
},
"io": false,
"cors": {
"origin": "https://my-domain.com",
"credentials": true
},
"error": {
"method_not_allowed": "Apologies, you do not have access."
},
"auth": {
"username": "cellphone",
"password": "password",
"access": 900,
"refresh": 31536000
},
"collections": {
"todos": {
"schema": {
"title": {
"type": "string"
}
},
"permissions": {
"*": true
}
}
}
}