From the course: Angular: Creating and Hosting a Full-Stack Site

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Set up a hapi server

Set up a hapi server

From the course: Angular: Creating and Hosting a Full-Stack Site

Start my 1-month free trial

Set up a hapi server

- [Instructor] To get started creating a backend for our app with node JS in Hapi, let's create a new directory outside of our front-end directory. Since our front-end code is in a directory called buy and sell, we're going to call this directory buy and sell backend. So we're going to click new folder and say buy-and-sell-backend and click Create and then open. And just as a side note here, in theory, we could have the backend code inside of our original directory, but in practice, it's usually just easier to keep the front-end and backend code of our app separated, especially as our code base gets larger and more complex. So inside our directory, let's open up a terminal and we're going to create a new npm package by typing npm init-y and hitting Enter. And once we've done that, let's install hapi into our project by saying npm install @hapi/hapi and hit Enter. And then we're going to create a new directory inside of…

Contents