Click here to read the full tutorial
Learn how to build a feature-complete API using NestJS that lets clients perform data operations on resources that describe a restaurant menu. Using TypeScript with Node.js gives you access to optional static type-checking along with robust tooling for large apps and the latest ECMAScript features.
Learn also how to define data models, create a data service, and quickly build modular endpoints. As an option, you can also learn how to secure the API using Auth0. To see your API in action, you’ll use a production client called "WHATABYTE Dashboard", which is inspired by the sleek web player from Spotify.
- Clone repository:
git clone git@github.com:auth0-blog/wab-menu-api-nestjs.git \
nest-restaurant-api \
- Make the project folder your current directory:
cd nest-restaurant-api
- Install the project dependencies:
npm i
- If you haven't set up any Auth0 applications, follow the steps from these tutorial sections to create them:
Register a Client Application with Auth0
Connect a Client Application With Auth0
- Create a
.env
hidden file:
touch .env
- Populate
.env
with this:
PORT=7000
AUTH0_DOMAIN="Your Auth0 domain"
AUTH0_AUDIENCE="Your Auth0 audience"
- Start the Express server:
npm run start:dev
If you have any questions or feedback, please contact us through our Community Site for this tutorial.
Auth0, the identity platform for application builders, provides thousands of enterprise customers with a Universal Identity Platform for their web, mobile, IoT, and internal applications. Its extensible platform seamlessly authenticates and secures more than 2.5B logins per month, making it loved by developers and trusted by global enterprises. The company's U.S. headquarters in Bellevue, WA, and additional offices in Buenos Aires, London, Tokyo, Sydney, and Singapore, support its customers that are located in 70+ countries.
For more information, visit https://auth0.com or follow @auth0 on Twitter.