Skip to content

Server config

Guillem Arias edited this page Jun 21, 2018 · 3 revisions

Detailed configuration:

{
  "server": {
    // The server address, can be empty for localhost
    "address": "",
    // Server runtime port
    "port": 4000,
    // Whether or not to serve the images
    "serveImages": true,
    // Cross origin requests settings
    "cors": { 
      "enabled": true,
      "options": {
        "origin": true
      }
    },
    // Public API endpoint
    "publicDomain": "http://localhost:4000", 
    "allowRegistration": true,
    "maxFileSize": "Infinite",
    // Nethloader Web Frontend location
    "clientPath": "$appdir/../client/dist" 
  },
  "security": {
    // Secret key for jwt API authentication
    "jwtSecret": "AAA"
  },
  "storage": {
    // Where to store Nethloader uploaded files
    "imagesPath": "$appdir/images", 
    "supportedExtensions": {
      "image": ["png", "jpg", "jpeg", "svg", "webp"],
      "video": ["mp4", "ogg", "webm", "gif"]
    },
    "unprocessableExtensions":  ["webp", "webm", "svg"]
  },
  // Database configuration, 
  "database": { 
    "username": "root",
    "password": "123456",
    "database": "nethloader",
    "host": "localhost",
    "port": 3306,
    "dialect": "mysql"
  }
}

Nethloader demo

Credentials:

username: demo@demo.com

password: demo

Clone this wiki locally