Code Monkey home page Code Monkey logo

access's Introduction

grunt-http-server

Provides static files server integration to Grunt

Donate Dependency Status

Divhide

npm install grunt-http-server

Getting Started

If you need to serve static files in your grunt directory you can add tasks with grunt-http-server.

Just add this task to Gruntfile:

grunt.initConfig({

	'http-server': {

		'dev': {

			// the server root directory
			root: <path>,

			// the server port
			// can also be written as a function, e.g.
			// port: function() { return 8282; }
			port: 8282,
			

			// the host ip address
			// If specified to, for example, "127.0.0.1" the server will 
			// only be available on that ip.
			// Specify "0.0.0.0" to be available everywhere
			host: "0.0.0.0",

			cache: <sec>,
			showDir : true,
			autoIndex: true,

			// server default file extension
			ext: "html",

			// run in parallel with other tasks
			runInBackground: true|false

		}

	}
});

grunt.loadNpmTasks('grunt-http-server');

And run:

grunt http-server:dev

Now your static files are available in http://127.0.0.1:8282/.

Oscar Brito

access's People

Contributors

santoshah avatar

Watchers

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