May 2018
Intermediate to advanced
492 pages
12h 3m
English
We are building our way towards integrating user information and authentication into the Notes application. The next step is to wrap the user data model we just created into a REST server. After that, we'll create a couple of scripts so that we can add some users, perform other administrative tasks, and generally verify that the service works. Finally, we'll extend the Notes application with login and logout support.
In the package.json file, change the main tag to the following line of code:
"main": "user-server.mjs",
Then create a file named user-server.mjs, containing the following code:
import restify from 'restify';import util from 'util';import DBG from 'debug';const log = DBG('users:service'); ...Read now
Unlock full access