Pages

Monday, 23 May 2022

chat-by-iliakan

based on 'Node.JS / Mongo / Express'

On the one hand, this example is educational, on the other hand, it implements the most important things that are usually required when developing sites:

    Configuration in files via nconf
    Regular pages that pass through the router
    EJS templating, (ejs-locals: partials, helpers, layouts)
    JSON service (essentially the same page)
    Authorization (Express, Connect, MongoDB)
    Closed page (/chat, requires authorization)
    Chat with Sock.JS, authorization integration (you can use Socket.IO or ws.js)
    Working with the database (MongoDB, Mongoose)
    Asynchronous call chains (Async.js)
    Logging (winston + modulo logger factory)
    Clustering (general architecture suitable + clusterMaster optional)

The architecture is suitable for development and expansion.
Usage

    git clone
    On Mac/Linux: npm start (or npm run dev or npm run cluster) 2.1 On Windows: start.bat (or dev.bat)
    openhttp://127.0.0.1:3000

You can enter the site through the "Login" link on the right.


Notes:
    there are no tests in the repository, they are not considered in this example.
    node_modules are included in the repository, this is the recommended practice for applications (see https://npmjs.org/doc/faq.html).

from https://github.com/iliakan/chat

No comments:

Post a Comment