This is a SSL server to handle user authentication & store data in a mysql database.
Simply run node server.js
The server needs root privileges, so if you are on linux, start the server with sudo node server.js
Create a new file named config.js
and copy the contents of the file exampleConfig.js
to your newly created file.
- The values for
config.ssl.keyLoc
andconfig.ssl.certLoc
should be absolute paths to the SSL key and the SSL certificate respectively. - The values for
config.db.host
,config.db.user
andconfig.db.pass
should contain the login data for the mysql database config.db.dbName
contains the name of a databaseconfig.server.port
contains the port the server is listening on. This is the port you want to send your data toconfig.server.swaggerPort
contains the port for the swagger documentation. This port has to be different fromconfig.server.port
!config.server.tokenSecret
contains any string of characters to validate your jwt tokenconfig.server.url
contains the base url of your service, which will be displayed in the swagger docsconfig.docs.user
andconfig.docs.pass
contain the credentials for the password protected swagger documentation