{"id":14970063,"url":"https://github.com/nicmeister/node-essentials","last_synced_at":"2026-02-07T15:32:30.709Z","repository":{"id":65460550,"uuid":"228638063","full_name":"NicmeisteR/Node-Essentials","owner":"NicmeisteR","description":"A node toolkit for doing async api calls, writing to file system, starting up express-js servers and more coming soon.","archived":false,"fork":false,"pushed_at":"2024-05-21T12:41:02.000Z","size":47,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T12:06:06.503Z","etag":null,"topics":["api-client","express","express-js","expressjs","filesystem","node","node-js","nodejs","rest-api","rest-client","restful"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NicmeisteR.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-17T14:46:58.000Z","updated_at":"2024-05-21T12:44:13.000Z","dependencies_parsed_at":"2024-05-21T13:51:34.786Z","dependency_job_id":"5a1df2cd-16c1-4fcd-9439-172d23b5fe01","html_url":"https://github.com/NicmeisteR/Node-Essentials","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":"0.020000000000000018","last_synced_commit":"d5f323c8f47a630ac41634c2902b901064629b24"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/NicmeisteR/Node-Essentials","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicmeisteR%2FNode-Essentials","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicmeisteR%2FNode-Essentials/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicmeisteR%2FNode-Essentials/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicmeisteR%2FNode-Essentials/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NicmeisteR","download_url":"https://codeload.github.com/NicmeisteR/Node-Essentials/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NicmeisteR%2FNode-Essentials/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265876950,"owners_count":23842956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","express","express-js","expressjs","filesystem","node","node-js","nodejs","rest-api","rest-client","restful"],"created_at":"2024-09-24T13:42:58.411Z","updated_at":"2026-02-07T15:32:30.672Z","avatar_url":"https://github.com/NicmeisteR.png","language":"JavaScript","funding_links":["https://paypal.me/NicolaasDev"],"categories":[],"sub_categories":[],"readme":"# Node-Essentials\nA node toolkit for doing async api calls, writing to file system, starting up express-js servers and more coming soon.\n\n![Issues](https://img.shields.io/github/issues/NicmeisteR/Node-Essentials?style=for-the-badge)\n![Forks](https://img.shields.io/github/forks/NicmeisteR/Node-Essentials?style=for-the-badge)\n![Stars](https://img.shields.io/github/stars/NicmeisteR/Node-Essentials?style=for-the-badge)\n![Size](https://img.shields.io/github/repo-size/NicmeisteR/Node-Essentials?color=green\u0026style=for-the-badge) \n![NPM](https://img.shields.io/npm/dm/node-essentials?color=red\u0026style=for-the-badge)\n![Tweet](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2FNicmeisteR%2FNode-Essentials?style=for-the-badge)\n\n## Community \n[![Community](https://discordapp.com/api/guilds/514169903196930050/widget.png?style=banner2)](https://discord.gg/zdqWsRB)\n\n## Donate, Support or Fund\n\nIf you love this project please consider donating or support the development by means of coffee. You may also fund this project to maintain active and close more issues. Just a cup of coffee is enough to appreciate our hardwork.\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=for-the-badge)](https://paypal.me/NicolaasDev)\n[![Support](https://img.shields.io/badge/Support-Buy%20Me%20A%20Coffee-orange.svg?style=for-the-badge)](https://Ko-fi.com/nicmeister)\n\n------------------\n\n## Setup\nRun:\n```cmd\nnpm install node-essentials\n```\n\nAnd include it in your app:\n```javascript\nconst node = require('node-essentials');\n```\n\nor\n\n```javascript\nimport * as node from 'node-essentials';\n```\n\u003cbr/\u003e\n\n------------------\n\n# Methods\n* [http](#http) - REST Requests.\n    * [get](#get) - Simple REST \"GET\" request.\n    * [post](#post) - Simple REST \"POST\" request.\n    * [put](#put) - Simple REST \"PUT\" request.\n    * [delete](#delete) - Simple REST \"DELETE\" request.\n\n* [helpers](#helpers) - Helper functions.\n    * [distinct](#distinct) - Return a Distinct array.\n    \u003c!-- * [groupBy](#groupBy) --\u003e\n\n* [server](#server) - Express server.\n    * [start](#start) - Set-up a express-js server on the specified port and directory.\n\n* [fileManager](#fileManager) - Manage files.\n    * [writeToFile](#writeToFile) - Writes anything passed through to storage as any file.\n    \u003c!-- * [readAllFiles](#readAllFiles) - Read all the files from the specified directory. --\u003e\n\n\n## \u003ca id=\"http\"\u003ehttp\u003c/a\u003e\n\n### \u003ca id=\"get\"\u003eSimple Get\u003c/a\u003e\n```typescript\nexecuteGet(url: string, options?: any): Promise\u003cany\u003e\n ```\n Implementation:\n```javascript\nimport http from 'node-essentials';\n\nasync function getData() {\n    const data = await http.executeGet(\"https://my-json-server.typicode.com/typicode/demo/db\").then();\n    console.log(data); \n}\n```\nResponse:\n```json\n{\n  posts: [\n    { id: 1, title: 'Post 1' },\n    { id: 2, title: 'Post 2' },\n    { id: 3, title: 'Post 3' }\n  ],\n  comments: [\n    { id: 1, body: 'some comment', postId: 1 },\n    { id: 2, body: 'some comment', postId: 1 }\n  ],\n  profile: { name: 'typicode' }\n}\n```\n### \u003ca id=\"post\"\u003eSimple Post\u003c/a\u003e\n ```typescript\nexecutePost(url: string, options?: any): Promise\u003cany\u003e\n ```\n  Implementation:\n```javascript\nimport http from 'node-essentials';\n\nasync function postData() {\n    const data = await http.executePost(\"https://my-json-server.typicode.com/typicode/demo/posts\", {\n        body: {\n            \"id\": 4,\n            \"title\": \"Post 4\"\n        }\n    }).then();\n    console.log(data); \n}\n```\nResponse:\n```json\n{\n    id: 4\n}\n```\n### \u003ca id=\"put\"\u003eSimple Put\u003c/a\u003e\n\n ```typescript\nexecutePut(url: string, options?: any): Promise\u003cany\u003e\n ```\n   Implementation:\n```javascript\nimport http from 'node-essentials';\n\nasync function putData() {\n    const data = await http.executePut(\"https://my-json-server.typicode.com/typicode/demo/posts\", {\n        body: {\n            \"id\": 4,\n            \"title\": \"Post 4\"\n        }\n    }).then();\n    console.log(data); \n}\n```\nResponse:\n```json\n{\n    id: 4\n}\n```\n### \u003ca id=\"delete\"\u003eSimple Delete\u003c/a\u003e\n\n ```typescript\nexecutePut(url: string, options?: any): Promise\u003cany\u003e\n ```\n   Implementation:\n```javascript\nimport http from 'node-essentials';\n\nasync function deleteData() {\n    const data = await http.executeDelete(\"https://my-json-server.typicode.com/typicode/demo/posts\", {\n        body: {\n            \"id\": 4,\n            \"title\": \"Post 4\"\n        }\n    }).then();\n    console.log(data); \n}\n```\nResponse:\n```json\n{\n    id: null\n}\n```\n\n\n\n## \u003ca id=\"helpers\"\u003ehelpers\u003c/a\u003e\n\n### \u003ca id=\"distinct\"\u003eDistinct\u003c/a\u003e\n```typescript\ndistinct(array: Array[any]);\n ```\n Implementation:\n```typescript\nimport * as node from 'node-essentials';\n\nconst nonDistinct = [1,1,1,2,3];\n\nfunction getDistinct(){\n    const distinct = node.helpers.distinct(nonDistinct);\n    console.log(distinct);\n}\n ```\nResponse:\n```javascript\n[1,2,3]\n```\n\n## \u003ca id=\"server\"\u003eserver\u003c/a\u003e\n\n### \u003ca id=\"start\"\u003eStart\u003c/a\u003e\n```typescript\nstart(port: number, directory: string);\n ```\n  Implementation:\n```typescript\nimport server from 'node-essentials';\n\nserver.start(3000, __dirname) // The \"__dirname\" is the relative path for the directory used by node. This would serve the current root directory.\n```\nResponse:\n```cmd\nListening on 3000\n```\n\n\n## \u003ca id=\"fileManager\"\u003efileManager\u003c/a\u003e\n\n### \u003ca id=\"writeToFile\"\u003eWrite To File\u003c/a\u003e\n```typescript\nwriteToFile(folder: string, fileName: string, extension: string, data: any);\n ```\n  Implementation:\n```typescript\nimport fileManager from 'node-essentials';\n\nconst data = {\n    sample: \"Sample Data\"\n}\n\nfileManager.writeToFile(\"./\", \"fileName\", \"json\", JSON.stringify(data));\n```\n\n\u003c!-- ### \u003ca id=\"readAllFiles\"\u003eRead All Files\u003c/a\u003e\n```typescript\nreadAllFiles(folder: string);\n ```\n  Implementation:\n```typescript\nimport fileManager from 'node-essentials';\n\nconst data = {\n    sample: \"Sample Data\"\n}\n\nfileManager.readAllFiles(\"./\");\n```\nResponse:\n```\n\n``` --\u003e\n\n## Author\n\nNode Essentials is Developed and Maintained by **[Nicolaas Nel](https://github.com/NicmeisteR)**\n\n[![Facebook](https://img.shields.io/badge/facebook-%231877F2.svg?\u0026style=for-the-badge\u0026logo=facebook\u0026logoColor=white)](https://facebook.com/nicmstr) [![Twitter](https://img.shields.io/badge/twitter-%231DA1F2.svg?\u0026style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/NicmeistaR) [![LinkedIn](https://img.shields.io/badge/linkedin-%230077B5.svg?\u0026style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://linkedin.com/in/Nicolaas-Nel) [![YouTube](https://img.shields.io/badge/youtube-%23FF0000.svg?\u0026style=for-the-badge\u0026logo=youtube\u0026logoColor=white)](https://youtube.com/c/NicmeisteR) [![DEV](https://img.shields.io/badge/DEV-%23000000.svg?\u0026style=for-the-badge\u0026logo=dev.to\u0026logoColor=white)](https://dev.to/NicmeisteR)\n\n---\n\nMade with 💙 and ☕ by Nicolaas Nel.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicmeister%2Fnode-essentials","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicmeister%2Fnode-essentials","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicmeister%2Fnode-essentials/lists"}