At the start of this chapter, we looked at the difference between CommonJS and ES6 modules, and settled on using the new ES6 module syntax, which uses the import
and export
keywords.
Next, we installed Node on our machine using nvm, and got acquainted with the npm
and yarn
package managers. We then set up a simple HTTP server using the native http
Node module. After that, we used Babel to transpile our ESNext code into a syntax supported by our local environment. We also set up nodemon
to watch for changes in our code and restart the server whenever a change is detected. Lastly, we incorporated ESLint to spot problems in our code, and use a pre-commit
Git hook to run the linter automatically before each commit.
In the next chapter, we will be following a test-driven development (TDD) approach to develop our API server, to provide functionalities for clients to create, read, update, and delete (CRUD) user objects on our database, using ElasticSearch as our data storage solution.
In...