molnos
v1.5.0
Published
The core API for MolnOS.
Readme
MolnOS Core
The core API for MolnOS.
Quick Start
Create molnos.config.json in the project root (setting your own details):
{
"email": {
"emailSubject": "Sign In To MolnOS",
"user": "[email protected]",
"password": "",
"host": "smtp.yourprovider.com",
"port": 465,
"secure": true,
"maxRetries": 2
},
"molnos": {
"dataPath": "data",
"initialUser": {
"userName": "user",
"email": "[email protected]"
}
},
"auth": {
"jwtSecret": "your-jwt-secret",
"magicLinkExpirySeconds": 900,
"jwtExpirySeconds": 3600,
"refreshTokenExpirySeconds": 604800,
"maxActiveSessions": 3,
"consoleUrl": "http://localhost:8000"
},
"oauth": {
"presets": {
"github": {
"clientId": "github-id",
"clientSecret": "github-secret",
"redirectUri": "http://localhost:3000/auth/oauth/github/callback"
},
"google": {
"clientId": "google-id",
"clientSecret": "google-secret",
"redirectUri": "http: //localhost:3000/auth/oauth/google/callback"
},
"microsoft": {
"clientId": "microsoft-id",
"clientSecret": "microsoft-secret",
"redirectUri": "http: //localhost:3000/auth/oauth/microsoft/callback"
},
"gitlab": {
"clientId": "gitlab-id",
"clientSecret": "gitlab-secret",
"redirectUri": "http: //localhost:3000/auth/oauth/gitlab/callback"
}
}
}
"server": {
"allowedDomains": [
"*"
]
}
}The API will be available at http://localhost:3000.
Using with MolnOS Console
When running the Console locally, configure it to use Core's API URL:
http://localhost:3000The Console's API URL (configured in auth.consoleUrl above) should match the Console's running port, typically http://localhost:8000.
See the documentation for more details
For further details, see the MolnOS documentation.
