teleren/devto huggingface dataset:
Building a Node.js Server with Microsoft SQL Database Integration
Tags: node, sql, mssql, react
Published: 2023-05-20 14:36:45

In this blog, we will explore the process of building a Node.js server with SQL database integration. We will start from the basics of setting up a Node.js project and gradually progress towards writing code that connects to an SQL database and retrieves data. We will also cover how to run the server using nodemon for a smoother development experience.

## Step 1: Setting up the Project
To begin, make sure you have Node.js and npm installed on your machine. Create a new project folder and open the terminal or command prompt inside it.

Initialize a new Node.js project by running this command in project folder.
```npm init``` 

Fill in the required information prompted by npm init to generate a package.json file, which holds project metadata and dependencies. "You can skip the filling information part by just click Enter in all fields so that it takes default values"

---

## Step 2: Installing Dependencies
To create a Node.js server and connect to an SQL database, we need to install the required dependencies.

Run the following command to install the necessary dependencies:

```
npm install express mssql
```

---

## Step 3: Writing the Code
In your code editor, create a new file (e.g., server.js) and add the following code:

```
const express = require('express');
const sql = require('mssql');

const config = {
  // SQL Server configuration details
};

const app = express();

app.get('/', function (req, res) {
  sql.connect(config, function (err) {
    // Connection error handling

    const request = new sql.Request();
    request.query('SELECT * FROM YourTableName', function (err, result) {
      // Query execution and error handling

      const tableData = result.recordset;
      res.json(tableData); // Send the data as a JSON response

      sql.close(); // Close the connection when done
    });
  });
});

app.listen(5000, function () {
  console.log('Server is running on http://localhost:5000');
});
```

---

Step 4: Running the Server with Nodemon
Nodemon is a utility that automatically restarts the server whenever a file is modified. It helps streamline the development process.

Install nodemon globally by running the following command:
```
npm install -g nodemon
```
Start the server using nodemon with the following command:
```
nodemon server.js
```

---

Conclusion:
In this blog, we covered the process of building a Node.js server with SQL database integration. We started by setting up a Node.js project and installing the necessary dependencies. Then, we wrote code to connect to an SQL database, execute queries, and retrieve data. Finally, we used nodemon to automatically restart the server during development. Now, you can expand on this foundation and create more sophisticated server applications with database interactions.

Don't forget to like, subscribe, and stay tuned for more exciting blogs! ❤️
Macaw Framework 1.1.0: Enhancing Security, Flexibility, and Robustness in Your Web Applications
Tags: ruby, webdev, backend, programming
Published: 2023-05-20 14:22:41

Hello everyone! Today, I'm delighted to announce the release of Macaw Framework 1.1.0, a significant update to my project of creating a Ruby-based web framework from scratch. In this version, I've introduced several exciting features and improvements, emphasizing flexibility, security, and robustness while preserving Macaw's simplicity and ease-of-use. Let's explore what's new in Macaw Framework 1.1.0!

## Extended SSL/TLS Key Support

In the spirit of enhancing security and giving you more choices, Macaw now supports Elliptic Curve (EC) keys for SSL/TLS, in addition to the previously supported RSA keys. To enable this feature, simply update your SSL configuration in the application.json file with the paths to your EC keys:

```json
{
  "macaw": {
    ...
    "ssl": {
      "key_type": "EC",
      "cert_file_name": "path/to/your/cert.pem",
      "key_file_name": "path/to/your/key.pem"
    },
    ...
  }
}
```

## Graceful Server Shutdown

I've rethought the server shutdown process to minimize the risk of data loss and ensure a safer shutdown experience. The newly introduced graceful shutdown mechanism allows Macaw to patiently wait for the active threads to complete their tasks before closing. No extra configuration is required for this - it's all handled behind the scenes!

## Improved Log Readability & Optional Automatic Logging

Your logs are critical for understanding what's happening under the hood. I've made improvements to enhance their readability, allowing you to better interpret and analyze Macaw's activities. Additionally, the use of the logging aspect, which logs the overall framework status and all request/response data, is now optional, offering you greater control over your logging preferences.

## Thread Starvation Prevention

In this update, I've addressed a potential thread starvation issue caused by abrupt client disconnections. I've fixed the corresponding error and introduced a mechanism to maintain the threads in the pool, enhancing the stability and reliability of the Macaw Framework.

## Getting Started with Macaw Framework 1.1.0

Setting up and using Macaw remains as simple as ever. Refer to my previous [post](https://dev.to/ariasdiniz/introducing-the-macaw-framework-a-simple-evolving-ruby-web-framework-lb3) for a step-by-step guide on how to get started with Macaw, including creating HTTP endpoints, setting up rate limiting, enabling SSL, caching, and Prometheus monitoring. Once you've set everything up, you can start the server using the `start!` method:

```ruby
app.start!
```

This release is an important step forward in my project's journey. I'm proud of what I've accomplished so far, but even more excited about the road ahead. Check out the Macaw Framework's GitHub repository [here](https://github.com/ariasdiniz/macaw_framework), and join me in this thrilling journey. Your contributions, feedback, and insights are greatly appreciated. Enjoy the new Macaw Framework 1.1.0!
Two easy questions I need answered asap please 🤟😊
Tags: help, datascience, beginners, tutorial
Published: 2023-05-20 14:15:57

I need info on how to attach a small message to my data that will be the first thing collected by data analytics. Im a newbie but im thinking it would have to be a cookie and an pixel? Help is much appreciated thank you and this community! 😎🤟
Are you ready to take your sports experience to the next level? 🏆⚽️🏀
Tags: web3, gamedev, fantasy, android
Published: 2023-05-20 13:42:18

<html>
<head>
  <title>New-age Fantasy Sports App Development</title>
</head>
<body>
<h1>Introducing New-age Fantasy Sports App Development, powered by Comfygen! 📲✨</h1>
<p>With our cutting-edge technology and expertise, we're revolutionizing the way you engage with sports. Our fantasy sports apps are designed to immerse you in the excitement of your favorite games like never before. Imagine creating your dream team, managing players, and competing with friends or fellow enthusiasts, all in real time. Our apps provide a seamless and interactive platform that brings the thrill of fantasy sports right to your fingertips. Whether you're a football fanatic, a basketball buff, or a cricket connoisseur, our New-age Fantasy Sports App Development has you covered. You'll have access to live score updates, player statistics, expert analysis, and much more, making every match a thrilling experience. At Comfygen, we understand the importance of customization. That's why we tailor our apps to meet your specific requirements. We work closely with you to ensure that your app reflects your brand identity and provides a unique and engaging experience for your users.</p>
<p>Our team of skilled professionals is dedicated to delivering top-notch quality and functionality. We stay at the forefront of industry trends, incorporating the latest technologies to enhance your app's performance and user satisfaction. So, whether you're a sports organization, a business looking to engage your audience, or an entrepreneur with a vision for a groundbreaking fantasy sports app, Comfygen is here to turn your ideas into reality.
</p>

<p>Get in touch with us today to discuss your project and embark on an exciting journey of New-age <a href="https://www.comfygen.com/fantasy-sports-app-development">fantasy-sports-app-development</a>. Let's create an app that brings sports enthusiasts together and amplifies the joy of the game.</p>
<h2>#FantasySportsApp #SportsTech #InnovationInSports #ComfygenTech</h2>
</body>
</html>
Join the development!
Tags: showdev, qt, cryptocurrency, cpp
Published: 2023-05-20 13:26:25

Hello Dev.to Community!
I want to share with you my project "Trading Platform". 
I've put a lot of time and effort into this project, and now I'm looking for your opinion and feedback. Please follow the link below to view the project:

[link to github](https://github.com/Bohdan17-bit/Trading-Platform)

![Preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjwjhamrvr0bfd1n99w8.jpg)

<center>How it's looks like</center>

I want to keep improving this project, so any suggestions are appreciated.
If you found this project cool, rate it with a star! :)
Awotech
Tags: webdev, javascript, beginners
Published: 2023-05-20 13:05:53

We, Awotech India started in the years 2017  is one of the foremost manufacturer, exporter and trader of high-quality Cold Storage,cold room, ripening Chamber and  commendable range of Cooling and Refrigeration Products . we are channel partner of Blue Star. We are offering Cold Storage/cols Room Installation Service to our clients which is best in India. As company name AWOTECH(All weather Operative Technology) we are best in our service committments also.
What you learning about this weekend?
Tags: codenewbie, discuss, learning, beginners
Published: 2023-05-20 13:00:00

Heyo 👋

What ya learning on this weekend?

Whether you're sharpening your [JS](https://dev.to/t/javascript) skills, making PRs to [your OSS repo of choice](https://github.com/forem/forem) 😉, sprucing up your portfolio, or [writing a new post](https://dev.to/new) here on DEV, we'd like to hear about it.

![Person sitting in front of a book shelf and pointing to the words "Always Learning"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6sxqsxrkskz0mq4u0kp6.gif)

Keep on keeping on, you'll get there! And when you do, make sure to celebrate. 🙌
Network Address Types in PostgreSQL. Why you need to know?
Tags: postgres, datatypes, networking, ipv4
Published: 2023-05-20 12:55:01

## Difference between data types and network address types in PostgrSQL.

Along with data types PostgreSQL offers some other data types called network address types. So, the difference between other data types and network address types is that network address types are used to store **IPV4**, **IPV6** and **MAC addresses**. while other data types are simple data types like any other programming language supports. 

There are four network address types.

- inet
- cidr
- macaddr
- macaddr8

### inet

This network address type holds IPV4 and IPV6 host address, and optionally its subnet, all in one field. It takes 7 or 19 bytes of storage. Subnet is basically represented by the total number of network address bits present in the host. For example, if the subnet is 32 and the address is IPV4, then it represents a single host, not the subnet. And similarly for IPV6, the address length is 128 bits. So, 128 bits uniquely represent a host address. 
Input format is address/y. Where address is an IPV4 or IPV6 address and y is the number of bits in the subnet. If /y is not given then it represents a single host. 

### cidr 

This network address type only holds IPV4 or IPV6 networks. Main thing about this is input and output format follow classless internet domain routing. Its format is almost same that of inet. If /y is not given then it represents a single host.

## So, whats the difference?

The main difference between inet and cidr is that unlike cidr, inet accepts nonzero bits to the right of the netmask. 

For example network address.

`192.168.0.1/24 
`
is valid for inet but not for cidr.


### macaddr

As the name suggests, macaddr stores the MAC addresses. For example Ethernet card hardware addresses. 
So, it accepts inputs of the following formats.

```
'08:00:2b:01:02:03'
'08-00-2b-01-02-03'
'08002b:010203'
'08002b-010203'
'0800.2b01.0203'
'0800-2b01-0203'
'08002b010203'
```

These examples all specify the same address. It accepts both capital and lower case letter for a to f.

## macaddr8

This type of network address types also stores MAC addresses but in EUI-64 format. Main thing about this is, it can accept both 6 and 8 bytes length and stores them in fixed length of 8 bytes, with 4th and 5th bytes set to FF and FE. 

Following are the examples of this,

```
'08:00:2b:01:02:03:04:05'
'08-00-2b-01-02-03-04-05'
'08002b:0102030405'
'08002b-0102030405'
'0800.2b01.0203.0405'
'0800-2b01-0203-0405'
'08002b01:02030405'
'08002b0102030405'
```

Same like macaddr these all examples specify the same address. same like macaddr it can accept both upper and lower case for the digit a to f in the input. 


That was a short introduction about network address types that PostgreSQL additionally supports along with other data types. To read in more details you can check reference.

##Reference
[https://www.postgresql.org/docs/14/datatype-net-types.html](https://www.postgresql.org/docs/14/datatype-net-types.html)
UnityFlow - Automated Workflow for Unity Projects
Tags: githubhack23, csharp
Published: 2023-05-20 11:55:43

## What I built 
A repository with code and actions that can be useful for C# projects and also Unity projects.

### Category Submission: 
**maintainer must-haves**

### App Link
[https://github.com/omegaleo/UnityFlow](https://github.com/omegaleo/UnityFlow)

### Screenshots 
N/A

### Description 
My entry takes an approach to the category of **maintainer must-haves** where my goal is to do a set of tools/template repo to help devs deploy and keep their documentation and changelogs up-to-date, it'll mostly be for C# developers and consists of the following:

- auto-tag: C# project that will be called whenever an issue is created/updated and will properly tag the issue depending on what is written in the title/description. Example: If I write @feature in the description, once the workflow is called it'll tag that issue with the feature tag. 
- changelog-generator: C# project that will be in charge of updating the changelog.md and also changes for the release whenever one is generated. Say for example, if I made a release with the tag v1.0.0, it'll call the workflow, get me all the commit messages since the last release that match a filter, update the release's description with those commit messages and also add the lines for it in the changelog.md
- documentation-helper: C# Project that will handle the automatic generation of documentation and is divided into 2 components:
 - Library: For now only has the DocumentationAttribute(used to mark methods/properties/classes for documentation, see image below for example) and DocumentationHelper, a static class that will go through all assemblies in the project and check for the DocumentationAttribute and return in a DocumentationStructure list that will be used to show the documentation;

![Documentarion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzh4gq7zi2z7x37zqejs.png)
 - DocumentationGenerator: Simple script that will be called manually from the Actions menu and that will update the documentation.md using the DocumentationHelper described above.

### Link to Source Code 
[https://github.com/omegaleo/UnityFlow](https://github.com/omegaleo/UnityFlow)

### Permissive License 
MIT

## Background (What made you decide to build this particular app? What inspired you?) 
Well, as a Unity Dev for the last 5 years I've always wondered what sort of tools would help me greatly improve my workflow and so with that in mind I started developing this repo.

### How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?) 
I have actions set up for the following:

- When a new issue/pull request is created: Call the auto-tag project and tag the issue/pull request
- When a new release is created: Call the changelog-generator project and write a list of changes compared to the previous release based on commit descriptions
- Manually: Call the documentation-helper project to write documentation for the projects that have the library added to.

### Additional Resources/Info
N/A
NEED HELP FOR SHOPIFY
Tags: shopifydev, webdev, beginners, needdhelp
Published: 2023-05-20 11:52:20

Hello Amazing Developer,

Just want to ask some help, My client has a website and asking me to edit I don't know the call of this but as you can see on the photo below. The YELLOW CIRCLED, my client wants to change the meta discription and also on the RED Circled my clients want also to change it into (about us, BN treament, Book now, shop, Promotion)

can you help me how can I do that? I am going a hard time searching it in youtube. Thank you in advance!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9kbpwxnl03uqd63mf1o.png)
BAJU KURUNG
Tags: bajukurung, bajukebaya, bajukurunghitam, bajukurungjohor
Published: 2023-05-20 11:47:13

Looking to buy baju kurung for Raya or any occasions ? <a href="https://bajukurung.net/">BajuKurung.net</a> is the top fashion shopping for Muslim , made in Malaysia. Check out our collections of hijabs, baju kurung, muslim dress and batik shirt.

<br>CONTACT:

<br>Address: No. 2 Jalan Laman Puteri 2, Bangi, 43000 Kajang, Selangor, Malaysia
<br>Phone: +601300131313
<br>Website: <a href="https://bajukurung.net/">https://bajukurung.net/</a>
<br>LinkedIn: <a href="https://www.linkedin.com/in/baju-kurung/
">https://www.linkedin.com/in/baju-kurung/
</a>
<br>Twitter:<a href="https://twitter.com/bajukurungnet1">https://twitter.com/bajukurungnet1</a>
<br>Pinterest: <a href="https://www.pinterest.com/bajukurungnet1/
">https://www.pinterest.com/bajukurungnet1/
</a>
<br>Facebook: <a href="https://www.facebook.com/bajukurungnet1 
">https://www.facebook.com/bajukurungnet1 
</a>
<br>Youtube:<a href="https://www.youtube.com/@BajuKurung">https://www.youtube.com/@BajuKurung</a>
<br>Instagram:<a href="https://www.instagram.com/bajukurungnet1/">https://www.instagram.com/bajukurungnet1/</a>
BAJU KURUNG
Tags: bajukurung, bajukebaya, bajaukurunghitam, bajukurungjohor
Published: 2023-05-20 11:21:38

Best Place To Buy Baju Kurung Online And Ships Worldwide – Baju Kurung NetLooking to buy baju kurung for Raya or any occasions ? BajuKurung.net is the top fashion shopping for Muslim , made in Malaysia. Check out our collections of hijabs, baju kurung, muslim dress and batik shirt.

Contact Us:

Address: Level 23 , Nu tower 2 , jalan tun Sambathan kl sentral 58200 Malaysia 
Phone: +60327271716 
Website: https://bajukurung.net/ 
Facebook : https://www.facebook.com/bajukurungnet1 
Instagram: https://www.instagram.com/bajukurungnet1/ 
Youtube: https://www.youtube.com/@BajuKurung 
Linkedin: https://www.linkedin.com/in/baju-kurung/
Twitter: https://twitter.com/bajukurungnet1
Pinteres: https://www.pinterest.com/bajukurungnet1/
DevToo.dev Recommendation and search engine for Dev.to articles. (Work in progress submission for GitHub actions hackathon 2023)
Tags: githubhack23, openai, postgres, svelte
Published: 2023-05-20 11:15:25

Please take a look at [devtoo.dev](https://devtoo.dev) where you can find related articles to one another from dev.to

Helps you explore the dev.to knowledge base by the topics of your interest.

The tech-stack is SvelteKit for the frontend talking to PostgreSQL via Prisma, everything running on [vercel.com](https://vercel.com)

The GitHub Actions are being used to fetch new articles from dev.to , there are 300k articles or so. The size is pretty heavy for Postgres, more then 2G, but it can handle it with ease.

OpenAI text embedding API is used to vectorise articles metadata and user search queries.

Bookmarklet and chrome extension are provided, for ease of integration with dev.to

Since it is work in progress and not an actual submission yet, I really would appreciate early comments and feedback.

Code is open source and available at [github.com/tzador/devtoo](https://github.com/tzador/devtoo)
Destructuring Props in React.js
Tags: react, reactjsdevelopment, webdev, javascript
Published: 2023-05-20 11:01:28


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2350foa9bw44rbuqzccc.png)For some time, I have been working with React, though still in the basics, I have learned new stuff that has helped me build component-based websites which that is basically what React is all about.

Out of curiosity to know more, especially in the basics before diving deeper into react fully, I decided to practice some ES6 methods in my project. as well all know, Es6 allows us to write less code but do more, which is one of the reasons I decided to try destructuring Props.

Props, a short name for property serves as an object that takes in value. These values are passed as attributes from a parent component and accessed on the child component through props.

I decided to share this today because I'm so happy my curiosity birthed this experience that I won't forget in a hurry.

Below, is how I normally pass and accept my props without destructuring.

```
import React from 'react';

const App = () => {
return(
 <React.Fragment>
   <Book title="Hello World"/>
</React.Fragment>
)
}

// Second component
import React from 'react';

const Book = (props) => {
 return (
<React.Fragment>
   <h1>{props.title}<h1/>
</React.Fragment>
)
}

```

Here I pass the title attribute with a value of string 'Hello World", from my Parent component(App) to my child component (Book), The Book now receives this value using props.title(the specifies it to be an object).

Below is the new way I do this same thing using destructuring.

```
import React from 'react';

const App = () => {
return(
 <React.Fragment>
   <Book title="Hello World"/>
</React.Fragment>
)
}

// Second component
import React from 'react';
//The first Instance
const Book = (props) => {
const {title} = props;
 return (
<React.Fragment>
   <h1>{title}<h1/>
</React.Fragment>
)
}

```
In the above code, I unpacked the value of the title from props which is an object and encoded my title to the h1, as simple as that. this method is very easy to use, especially when you have multiple values from the parent-to-child component.

Destructuring, lessen your code and also help you to stop repeating yourself. for me, it is a more proper and easy way to do things. You should try it out sometime.
React Components
Published: 2023-05-20 11:00:30

Blockchain is a digital ledger that securely logs and validates transactions or information. It is decentralised and transparent. The ledger is spread throughout a network of computers called nodes, rather than being controlled by a single central authority like a bank or government.
Imagine a shared spreadsheet that is synced and updated across numerous machines continuously. The spreadsheet is stored on every computer connected to the network, and anytime a new transaction or piece of information needs to be entered, everyone on the network collaborates to verify and accept its accuracy.
A transaction or piece of information is packaged into a "block" with other transactions or information once it has been confirmed. The term "blockchain" refers to a collection of blocks that are connected to one another and form a "chain."
**Click below for more information :**
https://youtu.be/BzI8OWBoIVg