Skip to content

Instantly share code, notes, and snippets.

View aaabdyrahmanov's full-sized avatar
🍀

Atamyrat Abdyrahmanov aaabdyrahmanov

🍀
View GitHub Profile
@aaabdyrahmanov
aaabdyrahmanov / 01-directory-structure.md
Created August 27, 2022 16:30 — forked from tracker1/01-directory-structure.md
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@aaabdyrahmanov
aaabdyrahmanov / index.js
Last active October 28, 2023 21:37
How to convert data into uppercase using Tranform Stream with HTTP Server in NodeJS
const http = require('http');
const { Transform } = require('stream');
const server = http.createServer((req, res) => {
// Create the transform stream:
// OPTION #1
const uppercase1 = new Transform({
decodeStrings: false
});
@aaabdyrahmanov
aaabdyrahmanov / index.vue
Last active September 4, 2020 11:32
How to create a socket connection in Vue.js
<template>
<div class="container">
<h1> Login </h1>
<form @submit.prevent="submitData()">
<label for="username">Username: </label>
<input
type="text"
placeholder="Enter your username:"
v-model="username"
required