Node.js by example : learn to use Node.js by creating a fully functional social network /
If you are a JavaScript developer with no experience with Node.js or server-side web development, this book is for you. It will lead you through creating a fairly complex social network. You will learn how to work with a database and create real-time communication channels.
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, UK :
Packt Publishing,
2015.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo Texto completo |
Tabla de Contenidos:
- Cover
- Copyright
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Table of Contents
- Preface
- Chapter 1: Node.js Fundamentals
- Understanding the Node.js architecture
- Installing Node.js
- Running Node.js server
- Defining and using modules
- Managing and distributing packages
- Creating a module
- Using modules
- Updating our module
- Introducing built-in modules
- Creating a server with the HTTP module
- Reading and writing to files
- Working with events
- Managing child processes
- Summary
- Chapter 2 : Architecting the ProjectIntroducing the basic layers of the application
- The task runner and building system
- Introducing Grunt
- Discovering Gulp
- Test-driven development
- The Model-View-Controller pattern
- Introducing the REST API concept
- Summary
- Chapter 3 : Managing Assets
- Serving files with Node.js
- CSS preprocessing
- Packing client-side JavaScript
- Concatenating with Gulp
- Modularity in the browser with RequireJS
- Moving from Node.js to the browser with Browserify
- Delivering HTML templates
- Defining the templates in script tagsLoading the template externally
- Writing HTML inside the JavaScript
- Precompiling templates
- Summary
- Chapter 4 : Developing the Model-View-Controller Layers
- Evolving the current setup
- Directory structure
- Forming the main server handlers
- Implementing the router
- Introducing Ractive.js
- Constructing the entry point of the application
- Defining a controller
- Managing our views
- Creating a model
- Summary
- Chapter 5 : Managing Users
- Working with the MongoDB database
- Installing MongoDBRunning MongoDB
- Connecting to the database server
- Extending the code from the previous chapter
- Updating our base model class
- Updating page navigation and routing
- Registering a new user
- Updating the frontend
- Updating the backend API
- User authentication with sessions
- Managing a user's profile
- Summary
- Chapter 6 : Adding Friendship Capabilities
- Finding friends
- Adding the search page
- Writing the model
- Fetching friends from the database
- Marking users as friends
- Displaying the linked users on the Profile pageSummary
- Chapter 7 : Posting Content
- Posting and storing text
- Adding a form to post text messages
- Introducing the content's model
- Updating the controller of the home page
- Storing content in the database
- Showing the user's feed
- Posting files
- Summary
- Chapter 8 : Creating Pages and Events
- Refactoring the API
- Adding a form to create pages
- Creating a record in the database
- Showing the currently added pages
- Showing a specific page
- Posting a comment to a page