This is a very simple app that demonstrates how to integrate Express JS with a third-party API that does not require complex authentication.
-
The website will have just the home page, which will display the image gallery imported from the third party api.
-
We will use the npm module superagent to connect with the third party api, and the modules handlebars and consolidate to prepare the template with the handlebars template engine.
-
The consolidate module help us to integrate handlebars with ExpressJS. We will use app.engine() for that.
- App dependencies: npm and our own modules (routes, model, etc).
- App instantiation.
- DB connection.
- App settings configuration: views, view engine, etc.
- Define middleware: static files, error handlers, etc.
- Define routes and request handlers.
- Start app in the server on a particular host and port.