Text Live platform-project structure

Source: Internet
Author: User

The main projects used are Angularjs, Bootstrap, Socket.io, Express, MongoDB

The main process of the project is that the page is accessed through the ANGULARJS service to the background, and Express is only responsible for background data processing. Personal feeling is the equivalent of Mvc+webapi way.

The project has been completed for several months, then did not immediately finishing, resulting in a lot of details are forgotten, so this decision to re-organize again, deepen the impression.

Here is the file structure of the project:

From top to bottom, explain:

The app folder contains all the files used in the front end, including:

Some HTML templates used by the COMPONENTS:ANGULARJS directive.

JS: All JS files are placed in this directory, including Controlle,service,filters and so on.

Ngmodules: The front end with some plug-ins, including sockets, Ui-router, Iscroll and so on.

Resource: all static resource files.

Views: HTML pages in the project.

There is only one www file in the bin folder, this file is used to start the project and is the main entry for the project.

The database file is stored in the data file.

There is only one live_server.js file in the Lib folder, which is used to listen for and process the socket request and process it on the server.

Models: This folder is the entity that is mapped to the MongoDB database table, the project uses the Mongoose operation database, so it is also the entity that Mongoose uses.

Node_modules: In this folder are some of the necessary modules in the project. Generally in the Package.json to configure the use of the module, directly run the command can be installed into this directory.

Public:express Framework generated folder, which put a static file, because the previous paragraph using Angularjs, so this folder is not useful for the time being.

Routers: This file is a routing file, and in this project, these files are the interfaces that the previous segment accesses. Used to provide the required data.

Views: The frame generated folder, which is placed in the foreground page, because the previous paragraph using Angularjs, so this folder is not useful.

App.js: When starting a project, this file will be called in the WWW file, where the project reference module, static resource path, routing, middleware, and so on are configured.

Text Live platform-project structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.