teleren/devto huggingface dataset:
Enhancing Our Node.js API: Hot Reloading with Nodemon, Bundling with Webpack & Using ES6
Tags: node
Published: 2023-09-22 10:17:38

Previous article:
[How to Make API using NodeJS and Express](https://eneaslari.com/articleview/how-to-make-api-using-nodejs-and-express-65098dfeb40791b8339e8506 "how-to-make-api-using-nodejs-and-express")

#### 1. Hot Reloading with Nodemon

**Nodemon** watches for changes in your source code and automatically restarts your server, improving your development experience.

**Step 1**: Install Nodemon:

```bash
npm install --save-dev nodemon
```

**Step 2**: Modify your `package.json`:

Add a start script:

```json
"scripts": {
  "start": "nodemon app.js"
}
```

You can now use `npm start` to run your server with hot reloading.

#### 2. Bundling Server Code with Webpack & Using ES6

To use ES6 and beyond features in Node.js, and also to bundle our server code, we can set up **Webpack** with **Babel**.

**Step 1**: Install required packages:

```bash
npm install --save-dev webpack webpack-cli @babel/core @babel/preset-env @babel/node babel-loader
```

**Step 2**: Webpack Configuration (webpack.config.js):

Create a `webpack.config.js` at your project root:

```javascript
const path = require('path');

module.exports = {
    entry: './app.js',
    target: 'node',
    mode: 'development',
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'bundle.js'
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@babel/preset-env']
                    }
                }
            }
        ]
    }
};
```

**Step 3**: Babel Configuration:

Create a `.babelrc` file in your project root:

```json
{
  "presets": ["@babel/preset-env"]
}
```

**Step 4**: Modify the Nodemon start script:

In `package.json`, update the start script to use the bundled code:

```json
"scripts": {
  "start": "nodemon --exec babel-node ./dist/bundle.js"
}
```

**Step 5**: Bundle the code:

Run the following command:

```bash
npx webpack
```

This will bundle your server code into `dist/bundle.js`.

#### 3. Using ES6 Features

With Babel set up, you can now use ES6 features in your Node.js code. Here are some ways to enhance our existing code:

1. **Use Import/Export Syntax**:

Instead of:

```javascript
const express = require('express');
```

Use:

```javascript
import express from 'express';
```

Similarly, change your `module.exports` to:

```javascript
export default yourModuleName;
```

And then import it using:

```javascript
import yourModuleName from './yourModulePath';
```

2. **Utilize Arrow Functions, Async/Await, and other ES6+ Features**:

For instance:

```javascript
exports.createUser = async (req, res) => {
    // Your code here
};
```

With the above configurations and changes, you've transformed your Node.js and Express API to use the latest ES6 features, bundled your server code, and added hot reloading capabilities. Happy coding!
What is a community? One point you should know
Tags: community, github, development, product
Published: 2023-09-22 10:06:19

What is a community?

It's all about interaction, means people can talk here, participating events here. And if you want to make a community, the first thing you should do is just comfirm that you have a basic foundation chat tool.

You can use X (aka Twitter), Discard, WeChat, or just Email, tel. But what i want to say is, you should use a tool that deeply combine to your community business scope. It means you should think about the workflow of your community, the users' use path. What most important is that the tool should make user(member of the community) easily to talk, to interaction, to make everything base on the community.

For example, in some community around coding, reviewing code is an mater thing, and you basic community tool should provide an convenient way to do this thing. It may have an able like easily to fetch the code snap to review, and a way easily to comment and reply, and even able to edit the code snap easily. It's all about 'convenience' and 'bidirectional interaction'. However, we just talk about one aspect here, you should think comprehensively about this community's business scope.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwx58svv4qnu0mc2kecz.png)

Maybe my coding community example would reminds you thinking about GitHub, the say so 'bigest coding community' somehow. But i would say GitHub doesn't have a good community morphology.

What is the problem? You can recall that where you can talk about the repo hosting in GitHub? Where you can talk about the coder you have seen in GitHub? Where you can talk about event around opensoure project community (base on repo hosting in GitHub, and develop as an community) in GitHub? Not GitHub provide these way, but opensoure project community themselves. 

And just like I said before, GitHub do the best in some aspects, such as code review, code host, CI/CD...just some aspect, but not the whole business scope.

However, the role GitHub plays make it should take more energy and cost in helping community hosting in it develop itselves better, just like what it do now. And it is a huger investment to adapt all communities' business scope, nobody can deal with it, so I understand the difficult situation GitHub stay in. But I would say, GitHub have to change mind, solve this problem in the new era of competition now!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtsu6y3uiblyttid2jrb.png)

BTW, on a more high view, if a third part community tool that use another model to think about combining more and more community business scopes, making a foundation tool that adapt more and more community business scopes, it would broken all the rule about community now. Maybe I would think about 'detachable'. :D
How to remove Node Modules from GitHub repository
Tags: github, git, node, npm
Published: 2023-09-22 10:02:50

# Follow Those Commands
1. make .gitignore file.
2. add node_modules/ line to gitignore file
3. Follow those command 

```git rm -r --cached .```
``` git add . ```
``` git commit -m "remove nodeModules files (by sameerkali)" ```
``` git push -f ```
Looking to elevate your online presence?
Published: 2023-09-22 09:37:43

Look no further! Pitangent, a leading web application development company, offers top-notch web app development services. Our experts craft custom web applications tailored to your unique needs. Trust Pitangent for exceptional custom web application development services that will set you apart from the competition. Contact us today to unlock your digital potential.
Unlock Your Online Success with  [Pitangent](https://pitangent.com/)
EMA LEW
Tags: electricalsystem
Published: 2023-09-22 09:35:49

We offer various services ranging from, EMA licence and renewal, electrical testing and commissioning, LEW preparation course, etc. Visit our services for more info.

VISIT OUR WEBSITE - [EMA LEW](https://www.resengrg.com/services)

LEW Services
Application to SP Services for new installations
Application / Renewal of EMA Licence
Fault Attendance
Provision of technical advice
Site Inspection


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1im3d5uf43qbw1srbqco.jpg)
Book Delhi to Agra Taxi Services | Guruji Travel pvt ltd
Tags: taxiservice, bookingcabs, cabonline
Published: 2023-09-22 09:34:37

Guruji Travel Pvt Ltd offers reliable and comfortable [Delhi to Agra taxi services](https://www.gurujitravel.com/packages/delhi-to-agra-taxi). Book now for a hassle-free travel experience with our professional drivers and well-maintained vehicles. Enjoy the convenience and flexibility of our services as you explore the iconic attractions of Agra.
🛒 litecart - shopping-cart in 1 file
Tags: opensource, go, github, vue
Published: 2023-09-22 09:31:58

[Litecart](https://github.com/shurco/litecart) is an open source shopping-cart in 1 file of embedded database (SQLite), convenient dashboard UI and simple site.

It handles orders and payments. Integrates with Stripe for payments and will support international pricing and VAT verification.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2023-09-22 09:30:00

---
title: What was your win this week?
published: true
description: Looking back on this past week, what was something you were proud of accomplishing?
tags: discuss, weeklyretro
published_at: 2023-09-22 09:30
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyck78r593005hlbngyn.jpg
---

Howdy 🤠

Hope everybody has an excellent weekend!

Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Hanging with your pets 🐶🐱🐰🐹

---

![A cute little hamster snuggling with a tiny teddy bear](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rkhyfrea3k9jvy4mgxy.gif)
The Home - Trusted furniture online retailer shop in Dubai
Tags: furniture, shop, online, uae
Published: 2023-09-22 09:27:39

The Home, a trusted furniture online retailer shop in Dubai, provides customized and unique pieces of furniture designs at high quality and affordable prices.

With a wide range of [Sofa](https://thehome.ae/product-category/living/sofas-lounges/) & lounges, Study Desk & Chairs, Cabinets & Racks, Coffee Tables, headboard with Bed bases, Bedroom Sets, Kid's Bedroom sets, Wardrobes, Pillows, [mattresses](https://thehome.ae/product-category/mattresses/), etc. Customers can work with experts at The Home to select fabrics and their required sizes to create a unique piece of furniture. All the products are made with excellent craftsmanship in the UAE with the guarantee of outstanding quality at affordable prices.
The Home provides a wide range of furniture for your home. Whether you are looking for living room furniture or [bedroom furniture](https://thehome.ae/product-category/bedroom/), we have it all. We offer high-quality products in different designs and sizes so that you can choose the best fit for your space. Our unique pieces of furniture will give your home a personalized touch while ensuring that they last.
⏳ These hacks are like a lottery for developers
Tags: productivity, programming, hacks, beginners
Published: 2023-09-22 09:19:37

Have you ever wondered how top developers stay ahead? 

We've reached out to a few Proxify members to learn how they stay productive and asked them to share their most effective practical tips.

Here are daily tips that top developers use to excel in remote jobs. 

## **💡 Concrete actions for success**

- 
Breaking down your goals into smaller, **actionable steps** provides a clear roadmap.

- 
Concrete actions are **measurable**.

- 
Achieving these smaller milestones serves as **motivation**.

Watch Carl Pullein explain how to use the Eisenhower Matrix to prioritize tasks effectively, offering a structured approach to decision-making and time management.

🔗 [How I use the Eisenhower Matrix to prioritize my work](https://www.youtube.com/watch?app=desktop&v=Z1R8MMnVnt8&utm_source=Career+Subscribers&utm_campaign=3988ccd0a0-EMAIL_CAMPAIGN_2023_03_28_09_26_COPY_01&utm_medium=email&utm_term=0_-f94fb5eda8-%5BLIST_EMAIL_ID%5D)

## **💡 Adaptability in the job market**

- 
Being open to **different types of roles** or companies expands your job search horizon.

- 
Working in different environments helps you **diversify your skill** set.

- 
Being adaptable allows you to meet and **work with a diverse group** of people.

Stay ahead with McKinsey's insights on the most significant technology trends of 2023, including generative AI, quantum computing, and the importance of tech talent dynamics.

[🔗 McKinsey Technology Trends Outlook 2023](https://www.mckinsey.com/capabilities/mckinsey-digital/our-insights/the-top-trends-in-tech?utm_source=Career+Subscribers&utm_campaign=3988ccd0a0-EMAIL_CAMPAIGN_2023_03_28_09_26_COPY_01&utm_medium=email&utm_term=0_-f94fb5eda8-%5BLIST_EMAIL_ID%5D#new-and-notable)


## **💡 Effective communication and collaboration**

- 
Being specific in your communication **eliminates ambiguity**.

- 
Effective communication facilitates **better problem-solving**.

Karl Sutt shares his insights on "How to communicate effectively as a developer," offering tactical and strategic tips for enhancing written communication skills in software development.

[🔗 How to communicate effectively as a developer](https://www.karlsutt.com/articles/communicating-effectively-as-a-developer/?utm_source=Career+Subscribers&utm_campaign=3988ccd0a0-EMAIL_CAMPAIGN_2023_03_28_09_26_COPY_01&utm_medium=email&utm_term=0_-f94fb5eda8-%5BLIST_EMAIL_ID%5D)

## **💡 Networking and job search**

- 
A strong network can open doors to opportunities.

- 
Networking provides valuable insights into industry trends.

- 
Your network can be a resource for learning.

Watch Susan Clark's insightful session on tech networking in 2023, offering strategies for online and offline engagement, building connections, and more.

[🔗 How to network in tech?](https://www.youtube.com/watch?v=C9fxOj87Mtk&utm_source=Career+Subscribers&utm_campaign=3988ccd0a0-EMAIL_CAMPAIGN_2023_03_28_09_26_COPY_01&utm_medium=email&utm_term=0_-f94fb5eda8-%5BLIST_EMAIL_ID%5D)
GitHub: Guida rapida e semplice alla creazione di un repository
Tags: github, developer
Published: 2023-09-22 09:18:08

Desideri avere un repository (o più di uno) per il tuo codice sorgente? Grazie a questo video potrai imparare come sfruttare **GitHub** ed in pochissimi minuti risolvere il problema!


{% youtube tnMfIEgs32g %}
Who's looking for open source contributors? (week 60)
Tags: discuss, opensource, contributorswanted, 100daysofoss
Published: 2023-09-22 09:00:00

---
title: Who's looking for open source contributors? (week 60)
series: Looking for Contributors
published: true
description: Discover which open source projects are actively seeking contributors. Learn how you can make a meaningful contribution to the open source community and gain valuable experience. Find out who's looking for open source contributors now.
tags: discuss, opensource, contributorswanted, 100DaysOfOSS
published_at: 2023-09-22 09:00 +0000
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
Open Source thrives through shared efforts. Whether you're a newcomer or a veteran, we're here to encourage your contributions, motivate your endeavors, and provide valuable assistance to maintainers. Together, we are building amazing things! 

## Tell us about your project
_Promote your project by providing a link to the repo. Everyone who posted in previous weeks is welcome back this week, as always 😄_

Open Source should be a welcoming space for contributors. The README is the front door of your project. If you'd like to check out an example of a README, here's our [OpenSauced/insights README](https://github.com/open-sauced/insights).

If you submit please have the following in your repo to make it welcoming and helpful for contributors:

1. README.md
2. CONTRIBUTING.md

Feel free to drop your issues and repos in the [OpenSauced Discord](https://discord.gg/opensauced) #:eyes:-looking-for-contributors channel at any time! 

Also, let us know if you'll be participating in Hacktoberfest.

If you're new to open source, and you're not sure where to start, check out our [Intro to Open Source course](https://github.com/open-sauced/intro). 

Finally, consider reading the [Best Practices for Maintainers](https://opensource.guide/best-practices/).

Just a note to say, we've restarted this post from something Ben was doing for a while :star-struck: 

Happy contributing!
How To add arguments to a launch configuration in vscode
Tags: javascript, vscode, productivity, webdev
Published: 2023-09-22 08:44:44


Just edit ```/.vscode/launch.json``` in the project folder and add the args you desire as an array in the json configuration. The example here is in javascript, but it can work very easily in python projects, go or any other language:

```json
     ...
            "args": [ 
                "--config",
                "./config/settings.json"
            ], 
     ...
``` 

A full configuration here:
```json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "MyApp",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "program": "${workspaceFolder}/app.js",
            "args": [ 
                "--config",
                "./config/settings.json"
            ],               
        }
    ]
}
```
Challenge #15
Published: 2023-09-22 08:17:09

Super simple, the only difference here is that the only assembly syntax provided it's AT&T syntax, so it forced me too look again. There's no too much difference, for example in INTEL-syntax it's in this way

```asm
mnemonic	destination, source
```

whereas, in the case of AT&T, the general format is

```asm
mnemonic	source, destination
```

## Analysis

The assembly code it's quite short as well.

```asm
f:                                      # @f
        xorps   %xmm0, %xmm0
        movups  %xmm0, 240(%rdi)
        movups  %xmm0, 224(%rdi)
        movups  %xmm0, 208(%rdi)
        movups  %xmm0, 192(%rdi)
        movups  %xmm0, 176(%rdi)
        movups  %xmm0, 160(%rdi)
        movups  %xmm0, 144(%rdi)
        movups  %xmm0, 128(%rdi)
        movups  %xmm0, 112(%rdi)
        movups  %xmm0, 96(%rdi)
        movups  %xmm0, 80(%rdi)
        movups  %xmm0, 64(%rdi)
        movups  %xmm0, 48(%rdi)
        movups  %xmm0, 32(%rdi)
        movups  %xmm0, 16(%rdi)
        movups  %xmm0, (%rdi)
        ret
```

In this case the analysis it's straight forward, we are basically 

**Formal description**

> making zero the first 256-bits of `rdi` register, that it's a buffer provided to the function `f`. That's it.
How to get Pinia store inside the plugin function?
Published: 2023-09-22 08:01:24


I have a helpers plugin which need to access Pinia store. The plugin have access to app object as all Vue plugins. I there a way to get Pinia store object from app instance inside the plugin? The plugin looks like

```
//import { useAppStore } from '@/store/app'  // This does not work. Pinia is not instantiated yet
//const appStore = useAppStore()

export default {
    install: (app) => {
        console.log(app)
        app.config.globalProperties.$translate = (translations, key) => {

            let result = translations[key] ? translations[key][0] : ''  // First item as default value or ''

        }
    }
}
```
Paloalto's Top Picks for PCNSA Study Material
Published: 2023-09-22 07:59:54

This honestly could be very [PCNSA Exam Dumps](https://dumpsboss.com/paloalto-networks-exam/pcnsa/)  extraordinary to put together for and you could without problems check your fulfillment in Palo Alto Networks Certified Network Security Administrator via way of the use of our amazing PAN-OS 10.0 PCNSA certification dumps of DumpsBoss. With the superior strategies, you're making your abilties the maximum latest and discover a technique to put together for the Palo Alto Networks Certified Network Security Administrator PAN-OS 10.0 Version examination as properly. Get From Here: DumpsBoss/PCNSA-pdf-dumps.html Get Free Demo Version Of Palo Alto Networks [PCNSA Exam Dumps](https://dumpsboss.com/paloalto-networks-exam/pcnsa/) PDF When you're dubious regarding the Palo Alto Networks PCNSA pdf dumps cloth then DumpsBoss affords a downloadable price-loose PCNSA dumps pdf demo which is obtainable price-freed from price. You must attest to the coolest excellent with the PCNSA examine cloth and achieve the advanced factors to put together. By the use of the actually loose updates you can speedy put together your Palo Alto Networks Certified Network Security Administrator PAN-OS 10.0 Version examination on the equal time and notice out every of the factors and vulnerable areas and deal with them via way of the use of the PCNSA examination dumps. We regularly replace DumpsBoss Palo Alto Networks PCNSA examination dumps training cloth. 

Get Upto 60% Off >>>>>> https://dumpsboss.com/paloalto-networks-exam/pcnsa/
Challenge RE #14
Tags: reverseengineer, assembly, c, challenge
Published: 2023-09-22 07:59:06

Something unexpected this time, I was quite confident with my assembly lines in x86 assembly given that it's the only assembly language I know. Now the challenge came up with this

```asm

  .method public hidebysig static bool  f(char a) cil managed
  {
    // Code size       26 (0x1a)
    .maxstack  8
    IL_0000:  ldarg.0
    IL_0001:  ldc.i4.s   97
    IL_0003:  blt.s      IL_000c

    IL_0005:  ldarg.0
    IL_0006:  ldc.i4.s   122
    IL_0008:  bgt.s      IL_000c

    IL_000a:  ldc.i4.1
    IL_000b:  ret

    IL_000c:  ldarg.0
    IL_000d:  ldc.i4.s   65
    IL_000f:  blt.s      IL_0018

    IL_0011:  ldarg.0
    IL_0012:  ldc.i4.s   90
    IL_0014:  bgt.s      IL_0018

    IL_0016:  ldc.i4.1
    IL_0017:  ret

    IL_0018:  ldc.i4.0
    IL_0019:  ret
  } // end of method some_class::f

```

Wait what? According to the description we have here

> Optimizing csc .NET compiler from MSVS 2015 (/o switch), ildasm output:

As you imagine I wasn't aware of this at all. Still I have to solve this shit, so we use our powerful tool called Google. Using Google I manage to understand what this code does, so here I go. By the way the documentation from Microsoft it's just amazing, God!! So detailed...at least in this case. Here it's a link to the instructions doc in case you will need them:

1. [ldarg.0](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.ldarg_0?view=net-7.0)
2. [ldc.i4.s](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.ldc_i4_s?view=net-7.0)
3. [blt.s](https://learn.microsoft.com/en-us/dotnet/api/system.reflection.emit.opcodes.blt?view=net-7.0)

## Analysis

There's something here to notice first of all, is that we are dealing with a stack machine here. Hence the lines

```asm
    IL_0000:  ldarg.0
    IL_0001:  ldc.i4.s   97
    IL_0003:  blt.s      IL_000c
```

Do the following:

1. Push **argument** at index 0 into stack
2. Move **97**, or letter 'a' in ASCII code, into stack as an int32
3. Pop **97** and the **argument** from the stack and check if **argument** < **97**, jump to location **IL_000c**.

This is the way arguments are evaluated. Keeping this in mind, we can infer that that this snippet of code, basically check that the character supplied it's less than `'a'` ASCII letter. You can find a list of [ASCII codes here](https://www.ascii-code.com/).

In the first 6 lines, we check if character supplied it's between `'a' and 'z'`, basically if it's a Lowercase letter in the English alphabet. If that's the case the program will return **1**. Analyzing the next block of code, we can also infer that we perform the same check, but this time with letters `'A' and 'Z'`. Basically checking if we have an uppercase letter. If that's the case we also return **1**. Otherwise we return **0**.

**Formal description**

> The program check if a supplied character belong to the English Alphabet. Returning **1** for true cases, and **0** otherwise.

## Conclusion

Don't be afraid of new stuffs, just Google.