Learning nodejs

General Discussion
  • Where would be the best place to find information on node.js with a view to teaching myself how to code.?
    I really want to change a few things theme wise as well as add a few functionality items, it will need to be a basic newbie guide to get me started then hopefully I can progress to more detailed stuff eventually.

  • Where would be the best place to find information on node.js with a view to teaching myself how to code.?
    I really want to change a few things theme wise as well as add a few functionality items, it will need to be a basic newbie guide to get me started then hopefully I can progress to more detailed stuff eventually.

    http://nodejs.org

  • I don't feel like you need to know a lot of node.js to customize the looks/appearance. Not sure what your skill level is as a coder but I would imagine you'd have better luck learning CSS, Bootstrap, and jQuery

    Once you get a handle on these, then start looking into node.js which would be useful when writing plugins

  • Thanks for the info, I feel this is going to take some time:D

  • Thanks for the info, I feel this is going to take some time:D

    Nothing is overnight, especially something like this which really does require a bit more general knowledge and understanding compared to the plug and play cookie cutter forums out there.

    If you love the UI and concept behind NodeBB early is the best time to jump on board so you can learn and understand the new features as they roll out 🙂 Hey I run a bunch of vb forums and this is like a totally new experience for me. Put the time in and you'll get out of it what you're looking for.


Suggested Topics


  • 1 Votes
    3 Posts
    292 Views

    @julian said in Nodejs Version Managers:

    In my experience there are few reasons to use a version manager, except for development reasons (i.e. testing on older versions of Node, etc.)

    In production, I am increasingly in favour of compartmentalization via containers (or currently, simply separate servers). They can each maintain their own version of Node via the OS package manager, and that's that.

    Yep. I concur one hundred percent with the separate vm's for production approach. I don't think I'd utilize containers directly unless I owned the bare metal and needed to leverage that investment for additional duties. And then I'd use a better hypervisor and launch a Linux vm from there. 😜

    I sometimes muck about with different nodejs based stuff that wants different versions, requirements, and such and thought it might be nice to forgo spinning up vm's for the quick exploratatories....

    None of them seem to want to play nicely with FreeBSD these days though so the question seems rather moot for my use case.

    Thanks for your thoughts.

  • 0 Votes
    1 Posts
    181 Views

    Every so often we update our installation guide. This time we had a lot to update with MongoDB and CentOS components having big updates since the last guide.

    How To Install NodeBB 1.13, NodeJS 13, MongoDB 4.2 on CentOS 8

    This is assuming a CentOS 8 Stream Minimal starting point, with "yum upgrade -y" having been run ahead of time. One script to take you from vanilla minimal install to fully running NodeBB community.

  • 0 Votes
    1 Posts
    455 Views

    Hi,
    I tried adding new relic package into my nodeBB install by adding
    after removing the new relic agent from app.js its working fine again.
    I just wanted to let other nodeBB forum administrators to know about this issue if they face same problem.

  • 0 Votes
    1 Posts
    320 Views

    Hi,

    Brief details of what is required:

    I have index.html page and index.js file under router. I am showing data from one collection say 'x' on page index.html. All the code related to router.get/post is done in index.js file.

    There is a button 'SubText' on index.html, m applying aggregation for search and storing output in new collection. Till here, everything is working fine.

    Now my requirement is when user clicks on 'SubText' button, after new collection, it should take it to different html page and show data from newly created collection.

    Please can anybody suggest/guide how to do this?

    Please find below the coder:

    Index.js

    var createGroups = function (db, callback) { var pipeline = [ { $match: { $text: { $search: "Error" } } }, {

    $project: { _id: 0, procPath: 1, bkgroundInfo: 1, "result": { $cond: { if: { $gte: [{ $indexOfCP: ["$bkgroundInfo", "Error"] }, 0] }, then: { $substrCP: ["$bkgroundInfo", { $indexOfCP: ["$bkgroundInfo", "Error"] }, 140] }, else: "Not Found" } } } }, { "$out": "SKSNodeColl" }

    ]
    db.aggregate(pipeline).toArray(function (err, result) {
    //assert.equal(err, null);
    console.log(result);
    callback(result);
    });
    };

    router.get('/newColl', function (req, res, next) { MongoClient.connect(url, { useNewUrlParser: true }, function (err, client) { if (err) { console.log(err); throw err; } var db = client.db("mydb"); var collection = db.collection("Users"); console.log("Mongo Connection - New Collection"); createGroups(collection, function (err, result) { console.log("newCollection Created"); var userdetails = path.join(__dirname, "/../views/userdetails.html"); console.log(userdetails); client.close();
    res.sendFile(userdetails);
    }); });
    });

    =====================
    Index.html

    <a href="/newColl"><input type="button" id="resultMatch" value="PatternMatchingResult" tabindex="1"></a>

    userdetails.html //page where I want to show data from new collection.(included ptrnSearch.js in this file in head section: )

    <form id="form1" name="form1" method="post" action="/fetch">
    <input type="hidden" name="id" value="" id="id" />
    <table border="1">
    <tbody>
    <tr>
    <th> ID </th>
    <th> Procedure Path </th>
    <th> Background Description </th>
    <th> Error Pattern </th>
    </tr>
    {% if (data.length) %}
    {% for item in data %}
    <tr>
    <td> {{item['_id']}} </td>
    <td> {{item['procPath']}} </td>
    <td> {{item['bkgroundInfo']}} </td>
    <td> {{item['result']}} </td>
    </tr>
    {% endfor %}
    {% endif %}
    </tbody>
    </table>
    </form>

    ptrnSearch.js //added to userdetails.html page

    router.get('/', function (req, res) { MongoClient.connect(url, function (err, client) { if (err) { throw err; } var db = client.db("mydb"); db.collection('SKSNodeColl').find({}).toArray(function (err, docs) { if (err) { throw err; } res.render('userdetails.html', { data: docs }); client.close(); }); }); });

    ==============================
    Many Thanks

  • 0 Votes
    16 Posts
    5k Views

    @tkiblin Does your environment include imgur plugin?