Giter Site home page Giter Site logo

mosessofteng / alx-backend-javascript Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 3.0 8.08 MB

ALX Software Engineering Programme, Backend Development using JavaScript, Typescript, Node.js, ExpressJS, Nodemon,

Home Page: https://github.com/MosesSoftEng/alx-backend-javascript

JavaScript 96.70% TypeScript 3.30%
babel es6-javascript eslint nodejs backend es6 expressjs nodemon javascript json

alx-backend-javascript's Introduction

๐Ÿ“– alx-backend-javascript

๐Ÿ“ƒ Topics Covered

  1. Introduction to JavaScript ES6 and Node.js.
  2. ES6 Data strucutures.

๐Ÿ’ป Projects

Introduction to Javascript ES6 (ECMAScript 2015). Setup and using: Babel, Eslint and Jest.

Introduction to JavaScript Asynchoronous Programming using Promises.

Introduction to Javascript ES6 Data Strucutre Types and Data Manipulation.

๐Ÿ‘‰ Go to project

Introduction to Typescript.

๐Ÿ”ง Project setup.

# Create project directory and readme.
mkdir ./0x04-TypeScript/
touch ./0x04-TypeScript/README.md

๐Ÿ‘‰ Go to project

The project is about implementing a session authentication mechanism without installing any other module. The learning objectives of the project include;

  • Understanding authentication, session authentication.
  • Cookies, sending cookies, and parsing cookies.

๐Ÿ”ง Project setup.

# Create project directory and readme.
mkdir ./0x02-Session_authentication/
touch ./0x02-Session_authentication/README.md
cd 0x02-Session_authentication

๐Ÿ‘‰ Go to project

This project involves learning NodeJS basics concept covered;

  1. Using NodeJS modules.
  2. Reading files.
  3. Creating HTTP servers.
  4. Using Express JS.
  5. Testing with Mocha.
  6. Using Nodemon.

๐Ÿ”ง Project setup.

# Create project directory and readme.
mkdir ./0x05-Node_JS_basic/
touch ./0x05-Node_JS_basic/README.md
cd 0x05-Node_JS_basic

touch package.json database.csv babel.config.js .eslintrc.js

echo '{
  "name": "node_js_basics",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "lint": "./node_modules/.bin/eslint",
    "check-lint": "lint [0-9]*.js",
    "test": "./node_modules/mocha/bin/mocha --require babel-register --exit",
    "dev": "nodemon --exec babel-node --presets babel-preset-env ./server.js ./database.csv"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "chai-http": "^4.3.0",
    "express": "^4.17.1"
  },
  "devDependencies": {
    "babel-cli": "^6.26.0",
    "babel-preset-env": "^1.7.0",
    "nodemon": "^2.0.2",
    "eslint": "^6.4.0",
    "eslint-config-airbnb-base": "^14.0.0",
    "eslint-plugin-import": "^2.18.2",
    "eslint-plugin-jest": "^22.17.0",
    "chai": "^4.2.0",
    "mocha": "^6.2.2",
    "request": "^2.88.0",
    "sinon": "^7.5.0"
  }
}
' >> package.json

echo "module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        targets: {
          node: 'current',
        },
      },
    ],
  ],
};
" >> babel.config.js

echo "firstname,lastname,age,field
Johann,Kerbrou,30,CS
Guillaume,Salou,30,SWE
Arielle,Salou,20,CS
Jonathan,Benou,30,CS
Emmanuel,Turlou,40,CS
Guillaume,Plessous,35,CS
Joseph,Crisou,34,SWE
Paul,Schneider,60,SWE
Tommy,Schoul,32,SWE
Katie,Shirou,21,CS" >> database.csv


echo "module.exports = {
  env: {
    browser: false,
    es6: true,
    jest: true,
  },
  extends: [
    'airbnb-base',
    'plugin:jest/all',
  ],
  globals: {
    Atomics: 'readonly',
    SharedArrayBuffer: 'readonly',
  },
  parserOptions: {
    ecmaVersion: 2018,
    sourceType: 'module',
  },
  plugins: ['jest'],
  rules: {
    'max-classes-per-file': 'off',
    'no-underscore-dangle': 'off',
    'no-console': 'off',
    'no-shadow': 'off',
    'no-restricted-syntax': [
      'error',
      'LabeledStatement',
      'WithStatement',
    ],
  },
  overrides:[
    {
      files: ['*.js'],
      excludedFiles: 'babel.config.js',
    }
  ]
};" >> .eslintrc.js

# Install depedencies
npm install

๐Ÿ‘‰ Go to project

This project involves how to use Redis and implementing Kue as a queue system. The learning objectives include;

  1. Running a Redis server.
  2. Using a Redis client for basic operations and with Node JS.
  3. Storing hash values in Redis.
  4. Dealing with async operations.
  5. Building a basic Express app interacting with a Redis server.
  6. Building a basic Express app interacting with a Redis server and queue.

๐Ÿ”ง Project setup.

# Create project directory and readme.
mkdir ./0x03-queuing_system_in_js/
touch ./0x03-queuing_system_in_js/README.md
cd 0x03-queuing_system_in_js

touch package.json .babelrc

echo '{
    "name": "queuing_system_in_js",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "lint": "./node_modules/.bin/eslint",
      "check-lint": "lint [0-9]*.js",
      "test": "./node_modules/.bin/mocha --require @babel/register --exit",
      "dev": "nodemon --exec babel-node --presets @babel/preset-env"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
      "chai-http": "^4.3.0",
      "express": "^4.17.1",
      "kue": "^0.11.6",
      "redis": "^2.8.0"
    },
    "devDependencies": {
      "@babel/cli": "^7.8.0",
      "@babel/core": "^7.8.0",
      "@babel/node": "^7.8.0",
      "@babel/preset-env": "^7.8.2",
      "@babel/register": "^7.8.0",
      "eslint": "^6.4.0",
      "eslint-config-airbnb-base": "^14.0.0",
      "eslint-plugin-import": "^2.18.2",
      "eslint-plugin-jest": "^22.17.0",
      "nodemon": "^2.0.2",
      "chai": "^4.2.0",
      "mocha": "^6.2.2",
      "request": "^2.88.0",
      "sinon": "^7.5.0"
    }
  }
' >> package.json

echo '{
  "presets": [
    "@babel/preset-env"
  ]
}
' >> .babelrc

# Install depedencies.
npm install

๐Ÿ‘‰ Go to project

This project involves learning how to use Mocha to write a test suite, different assertion libraries such as Node or Chai, presenting long test suites, using spies and stubs, hooks and unit testing with Async functions.

๐Ÿ”ง Project setup.

# Create project directory and readme.
mkdir ./0x03-queuing_system_in_js/
touch ./0x03-queuing_system_in_js/README.md
cd 0x03-queuing_system_in_js

touch package.json .babelrc

echo '{
    "name": "queuing_system_in_js",
    "version": "1.0.0",
    "description": "",
    "main": "index.js",
    "scripts": {
      "lint": "./node_modules/.bin/eslint",
      "check-lint": "lint [0-9]*.js",
      "test": "./node_modules/.bin/mocha --require @babel/register --exit",
      "dev": "nodemon --exec babel-node --presets @babel/preset-env"
    },
    "author": "",
    "license": "ISC",
    "dependencies": {
      "chai-http": "^4.3.0",
      "express": "^4.17.1",
      "kue": "^0.11.6",
      "redis": "^2.8.0"
    },
    "devDependencies": {
      "@babel/cli": "^7.8.0",
      "@babel/core": "^7.8.0",
      "@babel/node": "^7.8.0",
      "@babel/preset-env": "^7.8.2",
      "@babel/register": "^7.8.0",
      "eslint": "^6.4.0",
      "eslint-config-airbnb-base": "^14.0.0",
      "eslint-plugin-import": "^2.18.2",
      "eslint-plugin-jest": "^22.17.0",
      "nodemon": "^2.0.2",
      "chai": "^4.2.0",
      "mocha": "^6.2.2",
      "request": "^2.88.0",
      "sinon": "^7.5.0"
    }
  }
' >> package.json

echo '{
  "presets": [
    "@babel/preset-env"
  ]
}
' >> .babelrc

# Install depedencies.
npm install

๐Ÿ‘‰ Go to project

๐Ÿ‘จ Author and Credits.

This project was done by SE. Moses Mwangi. Feel free to get intouch with me;

๐Ÿ“ฑ WhatsApp +254115227963

๐Ÿ“ง Email [email protected]

๐Ÿ‘ A lot of thanks to ALX-Africa Software Engineering program for the project requirements.

alx-backend-javascript's People

Contributors

mosessofteng avatar xngigez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.