GithubHelp home page GithubHelp logo

isabella232 / now-serve Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vinnymac/now-serve

0.0 0.0 0.0 56 KB

Single-command static hosting

Home Page: https://zeit.co/blog/now-static

License: MIT License

JavaScript 100.00%

now-serve's Introduction

now-serve

This project is now deprecated! Please read this instead. 😊


Build Status XO code style Slack Channel

This packages makes it very easy to share directories using now!

How it works

When running the ns command, a temporary directory gets created. Within that directory, now-serve will insert a brand new package.json that conforms to now's requirements and therefore contains a start script that runs a new instance of list when being executed on our servers.

All of this happens completely automatically. So after running the command, the only thing you need to do is wait a few seconds until your files have been deployed and share the link! 💥

Usage

Install it (needs at least node v6)

$ npm install now-serve -g

Run it

$ ns <file | dir> [options]

You can find a list of all options below.

Options

Usage Description
-h, --help Output all available options
-V, --version The version tag of the now-serve instance on your device
‑c, ‑‑cmd [command] The command that should be run when starting
-n, --name [name] The name for your deployment
‑p, ‑‑packages <names> Custom packages to add to dependencies: "gulp, koa"
-a, --arguments A string containing arguments that will be passed on to now: "force, debug" (basically the names of the flags but without dashes)
-s, --single Serve single page apps with only one index.html in the root directory
--cache [seconds] How long static files should be cached in the browser

Contribute

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Uninstall now-serve if it's already installed: npm uninstall now-serve -g
  3. Link it to the global module directory: npm link
  4. Transpile the source code and watch for changes: npm start

Yeeha! Now can use the ns command everywhere.

now-serve's People

Contributors

leo avatar greenkeeperio-bot avatar rauchg avatar sammdec avatar olliv avatar timolins avatar vinnymac avatar wesbos 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.