![]() The placement of all of these items inside app.js is quite important, as they need to fit into a certain sequence. So in app.js we need to require the Passport module, require the Passport config and initialize Passport as middleware. Now Passport just needs to be added to the application. ![]() Note how the validPassword schema method is called directly on the user instance. This holds the routes, controllers and model, and is organized like this:Īt this starting point, each of the controllers simply responds with a confirmation, like this: module. The code for the API is all held in another folder inside the Express app, called api.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |