Skip to content

Instantly share code, notes, and snippets.

View viranmalaka's full-sized avatar
🎯
Focusing

Viran Malaka viranmalaka

🎯
Focusing
View GitHub Profile
@viranmalaka
viranmalaka / event-handler.js
Last active March 24, 2020 02:02
Event Emmiter
import storeUpdates from './storeUpdates';
export const STORE = {
ACTION_STORE: {
count: 999,
init: false,
},
DATA_STORE: {},
func: {
emit: (key, data) => {
var express = require('express');
var path = require('path');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var app = express();
app.use(logger('dev'));