Join Alexander Zanfir for an in-depth discussion in this video Creating an endpoint with Sails, part of Learning Node.js.
- Next let's take a look at sails and see how easy it is…to create an endpoint.…The first thing we'll need to do is install sails…and since it has a command line interface…we need to install it with the global attribute.…So let's go over to our console or a terminal.…We'll use npm install sails -g.…The next thing we'll need to do is create a sails project…and we'll create a new folder just for that.…So let's go to brackets and create new folder…and we'll call it sails.…
And now back in our console…we'll head over to that directory…and then we'll use the sails command line interface…to create a new project.…But before we continue, there's something I'd like to note.…That typically when we generate a new sails project,…there's both front end and back end components,…but since we're interested in only creating…a project that has endpoints or a web api…we won't need any front end components.…So I'll use the attribute --no-frontend…And now let's go inside brackets…and take a look at what we have in our folder.…
Inside the api subfolder is where most of the code…
- Installing Node.js
- Writing modules and packages
- Reading and writing files
- Working with frameworks: Express, Sails, and Koa
- Generating promises
- Working with generator functions
Skill Level Beginner
Q: When I try to install Bluebird/Express/Gulp/Sails/KOA using the Node Package Manager, it seems to install correctly in the terminal. But why doesn't my project folder change?
A: You need to make sure that you've navigated to your project folder in the terminal. For example, in this course Alexander is working from the C:\Dev\ folder both in Brackets and in the terminal.