GithubHelp home page GithubHelp logo

alokat7r / socialcopsterminatingprocesstask Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.56 MB

This repo contains the code for terminating any long-running process...detail inside.

JavaScript 95.15% CSS 1.40% HTML 3.46%

socialcopsterminatingprocesstask's Introduction

CONTENTS OF THIS FILE
----------------------------------
 * Introduction
 * About File Hierarchy 
 * Requirements
 * Installation
 * Run
 * Troubleshooting


INTRODUCTION
---------------------
* This project is a Nodejs based task, the task is to stop/terminate any erroneous request which is long-running and  
  wasting the server resources.
* The long-running task used as a sample is an iteration. 
* Redis is used to store values (We can also use any other server-side catching module like Memcached).
* Nodejs Cluster is used. 
* We are using localhost(127.0.0.1) with PORT = 3000 for the node server.
* We are using localhost(127.0.0.1) with PORT = 6379 for the Redis server.
* API = /start is to start the erroneous long-running task.
* API = /suspend is to terminate the erroneous long-running task.
* API = /hello is to test everything working fine.


ABOUT FILE HIERARCHY
-----------------------
* I have used express generator for express application generation.
* package.json <= It defines the application dependencies and other information.
* /bin/www <= It is the application entry point! The very first thing this does is require() the "real" application entry point(app.js).
* app.js <= This file creates an express application object (named app, by convention), sets up the application with various settings and middleware, and then exports the app from the module.
* /Routes <= This folder contain all the route files which are imported in the app.js file.
* /Views <= The views (templates) are stored in this directory (as specified in app.js) and are given the file extension .jade ( Jade is a markup language which basically optimizes the .html files by removing ceremony).


REQUIREMENTS
---------------------
* A Machine with the latest version of Node & NPM installed.
* A Machine with Redis Server installed up and running.


INSTALLATIONS
---------------------
* To install node (which include npm) go to 
   https://nodejs.org/en/download/
* To install Redis on Mac in terminal type - *brew install redis*, on 
   Window - https://redis.io/download


RUN
-----------------------
* To run Redis server in terminal type -  *redis-server*
* To run the nodejs app in a new terminal go the */socialcops/task* directory and type *npm start*
* Instead of running the *npm start* command you can directly run the app by clicking the /bin/www file.


TROUBLESHOOTING
---------------------------
* In case of any error make sure your Redis server up & running.
* While running the app please do look at the log in the terminal to get a better insight of what happening.
* If still there is any issue please do let me know on [email protected] or through cal on +91-7838981669.

socialcopsterminatingprocesstask's People

Contributors

nofeindia avatar

Watchers

James Cloos avatar Alok Ranjan Singh 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.