Skip to content

schneidermatic/NodeJS-HOWTOs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS-HOWTOs

This repository contains a collection of NodeJS-HOWTOs for learning/demo purposes.

TABLE OF CONTENTS

  1. Tested With
  2. Content
  3. Setup
  4. Run
  5. Stop
  6. Contributing

TESTED WITH

The HOWTOS are tested with the following software components...

Name Reference
Windows >= 11
Docker Desktop >= 4.12.0
WSL >= 2
Ubuntu >= 20.04.6 LTS (Focal Fossa)
docker 20.10.17
docker-compose v2.10.2

CONTENT

Id Description
001 HOWTO - Accept input from the command line with Node.js
002 HOWTO - Create File Uploading with Node.js (Express)
003 HOWTO - Create Simple HTTP(s) Client with Node.js
004 HOWTO - Create a Simple REST API with Prisma, PostgreSQL and Node.js (Express)
005 HOWTO - Create an Error-handling Middleware with Node.js (Express)
006 HOWTO - Create an Hello World App with Node.js (Express)
007 HOWTO - Dockerize a Node.js Web App (Express)
008 HOWTO - Execute Shell Commands in Node.js
009 HOWTO - Process JSON Post Requests with Node.js (Express)
010 HOWTO - Run a Simple JSON Server with Node.js
011 HOWTO - Set HTTP Status Codes with Node.js (Express)
012 HOWTO - Run Worker Threads with Node.js (Express)
013 HOWTO - Use Static Files with Node.js (Express)
014 HOWTO - Use Static Routes with Node.js (Express)
015 HOWTO - Use Swagger for documenting REST-APIs with Node.js (Express)
016 HOWTO - Use different HTTP methods with Node.js (Express)
017 HOWTO - Use Environment Variables with Node.js (Express)
018 HOWTO - Use HTTP(s) with Node.js (Express)
019 HOWTO - Use Parameters to Routes with Node.js (Express)
020 HOWTO - Use TypeScript with Node.js (Express)
021 HOWTO - Use Winston (Logging) with Node.js (Express)
022 HOWTO - Use Regex to Routes with Node.js (Express)
023 HOWTO - Use a View Engine (EJS) with Node.js (Express)

SETUP

  1. Clone the NodeJS-HOWTOs repo

     $ cd ~
     $ git clone [email protected]:schneidermatic/NodeJS-HOWTOs.git
    
  2. Select one of the HOWTOs i.e.

     $ cd NodeJS-HOWTOs/"HOWTO - Use Static Routes with Node.js (Express)/app"
     $ source ./.apprc
    
  3. Define the 'PROJECT_HOME' Variable in the $HOME/.nodejshw2s File

RUN

  1. Source the APP Environment (again)

     $ cd NodeJS-HOWTOs/"HOWTO - Use Static Routes with Node.js (Express)/app"
     $ source ./.apprc
    
  2. List all Shorthands

     $ cd NodeJS-HOWTOs/"HOWTO - Use Static Routes with Node.js (Express)/app"
     $ app_ls
    
       _   _  _____        _______ ___
      | | | |/ _ \ \      / /_   _/ _ \ ___
      | |_| | | | \ \ /\ / /  | || | | / __|
      |  _  | |_| |\ V  V /   | || |_| \__ \
      |_| |_|\___/  \_/\_/    |_| \___/|___/
     
     ----------
     app_banner
     app_ls
     app_new
     app_purge
     app_rm
     app_run
     app_setup
    
  3. Run the APP

     $ app_run
    
  4. Open your Browser an go to http://localhost:3000

STOP

  1. Stop the app with 'ctrl-c'

  2. Remove the 'node_modules' folder

     $ cd NodeJS-HOWTOs/"HOWTO - Use Static Routes with Node.js (Express)/app"
     $ app_rm
    

CONTRIBUTING

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request