Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Simple linklist script in NodeJs
New on LowEndTalk? Please Register and read our Community Rules.

Simple linklist script in NodeJs

Hi,

I have finished a small linklist web application in nodejs.

Features:

  • Flat file based - No database required
  • Caching to disk / ram
  • Nested treeview
  • Link descriptions

Screenshot:

Screenshot

Sourcecode:

The project is opensouce and available on Github: https://github.com/gehaxelt/Nodejs-Simple-Linklist

This is my first nodeJS webapp. Feedback/suggestions appreciated :)

Best regards,
gehaxelt

Thanked by 1ehab

Comments

  • Good work! :)

    +1

    This signature wasted 121 bytes of your data allocation.

    https://nixstats.com/report/56b53d6465689e44598b4567

  • Legit,

    Please commit as a package so we can all benefit from centralized installation:

    npm install node-linked-list

    Or similar naming scheme.

    Acting Director of Albino Geek Services Ltd. My Keybase ID ( gh )
    GoodHosting.co | Enterprise KVM Virtual Private Servers | Twitter / Status : @ GoodHostingCo

  • @GoodHosting said:
    Legit,

    Please commit as a package so we can all benefit from centralized installation:

    npm install node-linked-list

    Or similar naming scheme.

    Will read about how to do it and commit it this evening or tomorrow.

  • GoodHostingGoodHosting Member
    edited September 2014

    @gehaxelt said:
    Will read about how to do it and commit it this evening or tomorrow.

    Of course the name can be anything, that was just an example of how simple it would be for people to use this if you committed it as a Node.JS package, then anyone with the node package manager (standard) could add it to their project with a single command.

    npm install [-g] <package>

    Acting Director of Albino Geek Services Ltd. My Keybase ID ( gh )
    GoodHosting.co | Enterprise KVM Virtual Private Servers | Twitter / Status : @ GoodHostingCo

  • Okay, you should be able to find a package named simplelinklist in the npm repository.

    However, after an installation you still need to configure the application.

  • @GoodHosting said:
    Legit,

    Please commit as a package so we can all benefit from centralized installation:

    npm install node-linked-list

    Or similar naming scheme.

    This should never, ever be done. This is completely wrong for Node.js. NPM is a package repository, this is 100% not a package but an app/website. NPM is used for installing modules such as express which are then used to create apps like these. If you're pushing apps/websites to NPM then you are just overloading it and filling it up. It is not even the correct usage, when you npm install simplelinklist it will put it in the global node_modules folder but you have no way to run it since it's not a binary nor can it be accessed from a new Node.js app. This is because it is a service/app itself and therefore the code should just be pulled from Github and then npm install'd and then ran. Please don't commit apps to npm

    VPS Services in Rotterdam, Netherlands and Strasbourg, France - https://definedcodehosting.com - All owned hardware in NL and UK. Email [email protected] for UK services, software development and systems administration.

  • Hey @definedcode,
    thanks for the info!

    I unpublished the package from the NPM repository.

    Best regards,
    gehaxelt

  • @gehaxelt said:
    Hey definedcode,
    thanks for the info!

    I unpublished the package from the NPM repository.

    Best regards,
    gehaxelt

    Not your fault, its just not meant for that. Your project looks awesome anyway. Good job!

    Thanked by 1gehaxelt

    VPS Services in Rotterdam, Netherlands and Strasbourg, France - https://definedcodehosting.com - All owned hardware in NL and UK. Email [email protected] for UK services, software development and systems administration.

  • GoodHostingGoodHosting Member
    edited September 2014

    @definedcode said:

    It really doesn't seem like a "website" to me, just have a look at the other "mutli-feature" things that are already part of the NPM repository and tell me they are also "websites" ? His code contains a re-usable routine for creating, tracking, and displaying a linked list. While it may be a mainly UI package, these exist in the NPM repository today and aren't screamed at for being there.


    Most Used / Depended Upon

    https://www.npmjs.org/package/commander


    Recently Added

    https://www.npmjs.org/package/archey

    https://www.npmjs.org/package/csbc

    https://www.npmjs.org/package/insightjs

    https://www.npmjs.org/package/meteor-nebula


    After I started looking, I found that there are actually lots of binaries on the NPM repository as is, which is pretty surprising; I didn't think there were so many as there actually are. Above is just a list of the few I was able to find in the top page.


    To clarify, I'm actually curious myself as to when (or if already) a set of "best practices" for contributing and maintaining packages for NPM repositories will come into standard of being, as it has with RPM packages and the fedora audit process for example. My post is more inquisitive than it is point, I am rather curious as to what your thoughts are, and why these packages listed above are precluded from the same scrutiny.

    Thanked by 1gehaxelt

    Acting Director of Albino Geek Services Ltd. My Keybase ID ( gh )
    GoodHosting.co | Enterprise KVM Virtual Private Servers | Twitter / Status : @ GoodHostingCo

  • definedcodedefinedcode Member
    edited September 2014

    @GoodHosting said:
    To clarify, I'm actually curious myself as to when (or if already) a set of "best practices" for contributing and maintaining packages for NPM repositories will come into standard of being, as it has with RPM packages and the fedora audit process for example. My post is more inquisitive than it is point, I am rather curious as to what your thoughts are, and why these packages listed above are precluded from the same scrutiny.

    Right, okay. Do you commit a website to RPM? No. If you look at all the packages you listed, (apart from archey which is acceptable since it's a CLI tool and has a binary provided and linked). Do you see any websites or any packages that can't be included in a Node.js app to build something else? No. Commander (popular package) is required into a Node app and used. That is what NPM was made for. NPM was not made for committing your everyday app/website that isn't going to be used by everyone or can be included in another package. For this project it isn't going to be used in it's standard state. It will be heavily modified and therefore there is no sense in having it in a /opt/node/node_modules/ folder (for example) rather than ~/linklist. Again, this is not what NPM is for and this is coming from someone who codes Node.js a lot (for a job).

    You say this is a 'reusable routine', it may be but the code is reusable, you can't include it in your own Node.js app and reuse it (via require 'linklist') for example which is what NPM was intended for (+ CLI apps/UI apps that aren't intended to be modified). You don't npm install a package to then rip out its guts. That's what Github and other OSS sites are for.

    Thanked by 1gehaxelt

    VPS Services in Rotterdam, Netherlands and Strasbourg, France - https://definedcodehosting.com - All owned hardware in NL and UK. Email [email protected] for UK services, software development and systems administration.

  • @definedcode said:

    Thanks for the bit of explanation and detail into the background of that.

    This being said, I can see linklist being used (as is) as a package, and have already started using it as such myself. If you look at NPM repository as it is, a lot of package dependencies are fetched from GIT as they are (with packages.json , depends.json , or just using the NPM format archive, and other methods.)

    I don't see how @OP 's project can't be the same.

    Thanked by 1gehaxelt

    Acting Director of Albino Geek Services Ltd. My Keybase ID ( gh )
    GoodHosting.co | Enterprise KVM Virtual Private Servers | Twitter / Status : @ GoodHostingCo

  • @GoodHosting said:
    I don't see how OP 's project can't be the same

    You're completely missing the definition of a package/module as used by all Node.js devs. You do not include this linklist app in other Node.js code. It's not possible and would never be done by a sane developer. If it was changed to have the ability and functionality to do that (say it was a class and you could pass an array of objects to it and it would output/serve the HTML then it would be ok to put it on NPM). But it isn't. The OP even defines it as a 'webapp'. You don't see google committing their website to NPM or LET etc. This is not a module that can be included in a project. This is not a dependency either, please check your definitions/understanding of Node.js

    Thanked by 1gehaxelt

    VPS Services in Rotterdam, Netherlands and Strasbourg, France - https://definedcodehosting.com - All owned hardware in NL and UK. Email [email protected] for UK services, software development and systems administration.

  • GoodHostingGoodHosting Member
    edited September 2014

    @definedcode said:
    If it was changed to have the ability and functionality to do that (say it was a class and you could pass an array of objects to it and it would output/serve the HTML then it would be ok to put it on NPM). But it isn't.

    That being said, that's what I've already done for my purposes (it's not rocket surgery buddy.)

    I've literally been reading your posts so far as "I'm better than you at programming in Node, and even though there are no standards published or maintained on this platform yet due to its' infancy, I will still go around as if my word is law." and "Example applications or packages containing example code (or code in which could be used to bootstrap a webapp( would be banned and never exist, fuck people who learn by example."

    A great example of this: MeteorJS

    Acting Director of Albino Geek Services Ltd. My Keybase ID ( gh )
    GoodHosting.co | Enterprise KVM Virtual Private Servers | Twitter / Status : @ GoodHostingCo

  • @GoodHosting said:
    A great example of this: MeteorJS

    No but what i'm saying is you shouldn't have to edit it to make it into a package. Then how do you update it? If it's a package in NPM it shouldn't ever be edited because then you can't update it if say an XSS or 0day is found.

    I'm not saying I'm better than you, I'm trying to show you why this shouldn't be done so that you don't do it in the future, I feel my above statement is a really serious one as to why you shouldn't. People learn by example, correct. That's what Github is for, public git repos, blog posts. Not filling up a package manager, that's what makes source lists slow and package managers slow as they get overloaded.

    I still fail to see how (as you referred NPM ~= RPM) you would ever commit a package to RPM that was a website or was code that would then have to be edited to make it usable. It's just not done, and if it is, it shouldn't.

    VPS Services in Rotterdam, Netherlands and Strasbourg, France - https://definedcodehosting.com - All owned hardware in NL and UK. Email [email protected] for UK services, software development and systems administration.

Sign In or Register to comment.