Giter VIP home page Giter VIP logo

dynassets's Introduction

Dynassets

Dynassets creates a simple server to serve static files like JavaScript, CSS etc. with specific delay.

E.g.

http://localhost:3000/asset/js/3000 would serve a JavaScript file that would take at least 3s before the 1st byte to return.

Use this to create HTMl pages with different delay value on different assets to check their impact on load-time performance in different browser.

E.g.

Load up a web font with 5s delay to see how different browsers behaves when waiting for the font to download.

Load up a CSS in different parts of HTML with 2s delay to see how it impacts rendering in different browsers.

I needed a quick way to generate different kinds of static files with different delay values to understand how different browsers handle them and how it impacts the application that I create. And the result is dynassets

Installation

$ npm i dynassets -g

Usage

$ dynassets

Now, you can start using delayed assets in your templates.

E.g.

  • Javascript: http://localhost:3000/js/1000
  • Stylesheet: http://localhost:3000/css/1000
  • Font: http://localhost:3000/font/1000 (Serves Roboto font from Google)
  • Image: http://localhost:3000/image/1000 (Serves random image from lorempixel)

If you need to use a different port number:

$ dynassets -p 3001

If you need to serve assets on a url reachable via the internet

$ dynassets -t

dynassets's People

Contributors

prashantpalikhe 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.