Building Faster APIs with NodeJs and redis


In this tutorial we will be building an API to compute the total number of stars a GitHub user has across all their public repositories. We'll be using: The GitHub API to get information about all the user's repositories NodeJs to handle the HTTP requests and compute the total stars redis as a caching layer … Continue reading Building Faster APIs with NodeJs and redis

Advertisements

Node Js: No ‘Access-Control-Allow-Origin’ header is present on the requested


Add script to file server.js   // Parsers for POST data app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); // Point static path to dist app.use(express.static(path.join(__dirname, 'dist'))); // Add headers app.use(function (req, res, next) { // Website you wish to allow to connect res.setHeader('Access-Control-Allow-Origin', 'http://localhost:4200'); // Request methods you wish to allow res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, … Continue reading Node Js: No ‘Access-Control-Allow-Origin’ header is present on the requested

Append js libraries dynamically to the document in angular 2


ScriptStore.ts that will contain the path of the script either locally or on a remote server and a name that will be used to load the script dynamically interface Scripts { name: string; src: string; } export const ScriptStore: Scripts[] = [ {name: 'filepicker', src: 'https://api.filestackapi.com/filestack.js'}, { name: 'rangeSlider', src: '../../../assets/js/ion.rangeSlider.min.js' } ]; script.service.ts is … Continue reading Append js libraries dynamically to the document in angular 2

Factory Method Pattern In C#


Definition Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.   Frequency of use: High     UML class diagram       Participants   The classes and objects participating in this pattern are: Product  (Page) defines the interface of objects … Continue reading Factory Method Pattern In C#

Abstract Factory Pattern In C#


Definition Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Frequency of use: High UML class diagram Participants The classes and objects participating in this pattern are: AbstractFactory  (ContinentFactory) declares an interface for operations that create abstract products ConcreteFactory   (AfricaFactory, AmericaFactory) implements the operations to create concrete product objects … Continue reading Abstract Factory Pattern In C#

Some website to get new an idea for your app


https://www.pinterest.com/efreedman/ux-mobile-design-inspiration/ https://dribbble.com/shots http://inspired-ui.com/ https://inspirationmobile.tumblr.com/ https://www.pttrns.com/ https://www.uxapprentice.com/ http://uxmastery.com/ http://ibuildapp.com/marketplace/Templates/?all=1 https://www.awwwards.com/ https://unsplash.com/ https://ios.uplabs.com/