Book Image

Learn Node.js by Building 6 Projects

By : Eduonix Learning Solutions
Book Image

Learn Node.js by Building 6 Projects

By: Eduonix Learning Solutions

Overview of this book

<p>With its event-driven architecture and efficient web services capabilities, more and more companies are building their entire infrastructure around Node.js. Node has become a de facto part of web development that any serious developer needs to master.</p> <p>This book includes six Node.js projects that gradually increase in complexity. You'll start by building a simple web server and create a basic website. You will then move to create the login system, blog system, chat system, and e-learning system.</p> <p>By creating and following the example projects in this book, you’ll improve your Node.js skills through practical working projects, and you'll learn how to use Node.js with many other useful technologies, such as ExpressJS, Kickstart, and Heroku.</p>
Table of Contents (12 chapters)

Text editor and adding categories


Now we can add posts to our applications, so next we'll make the application in such a way that we can add categories; however, before we do this, I want to implement an editor so that when we enter, when we create a post, we can have this little text editor enabling us to make the text bold, change the font size and do things like that. There are a lot of different options you can use, but CKEditor is a really good one of them all; it has a lot of features and it's really simple to set up. So we will go to ckeditor.com and click on Download:

`

We need the standard version, not the basic one. So let's save it, then open it up, and take the whole folder and put it into our application. We'll take projects and nodeblog and will paste them inside the public folder. Next we'll go to add, which is in views and then addpost.jade. We need to include the script at the bottom, so let's go down and enter script(src='/ckeditor/ckeditor.js'):

.form-group
    label Author...