/joi-schema-validation-sourcecode

The source code for tutorial on Node API Schema Validation with Joi.

Primary LanguageJavaScript

joi-schema-validation-sourcecode

You can checkout the complete tutorial on Scotch: Node API Schema Validation with Joi.

Source code for tutorial on Node API Schema Validation with Joi. In order to run the demo on your local machine and experiment with the source code, do the following:

  • Clone the repository into a new directory on your machine

  • Run the following command from the new directory to install the dependencies:

npm install
  • The app will run on port 3000 by default. If you would prefer another port, you can specify it in the app.js file. Look for the following line in the file and replace 3000 with your desired port.
const port = process.env.NODE_ENV || 3000;
  • Finally, start the demo app by running the following command:
npm start