Giter Club home page Giter Club logo

share-your-code's Introduction

share-your-code

๐Ÿš€ Share your static project quickly with 1 command line. ๐Ÿš€

Example

Prerequisite

Install Docker

Download and install ngrok

Please follow instructions here : https://ngrok.com/download

What is ngrok?

Ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels.

Instantly create a public HTTPS url for a website running locally on your development machine.

Ngrok offloads TLS so you don't have to worry about your configuration.

Installation


# Clone the repo

git clone [email protected]:francoislamiedepain/share-your-code.git

# change the working directory to share-your-code
$ cd share-your-code

Usage

Simply run command :

username@fha share-your-code (main) $ ./share-your-code.sh

Share your own content

Simply modify/change current .html, .css , .js files for your own needs.

How it's work

share-your-code.sh will simply build a new docker container based on a Dockerfile

FROM nginx:alpine
COPY ./src /usr/share/nginx/html

FROM : creates a layer from the nginx:alpine Docker Image.

COPY : adds files from /src to nginx /usr/share/nginx/html directory.

You just need to change static files in /src to run your own code.

share-your-code.sh will delete previous container if exists and run new container based on provided informations.

Final step will run

./ngrok http http://localhost

Then your application can be access from anywhere.

Traffic is relayed through to the ngrok process running on your machine and then on to the local address you specified. (here localhost:80) .

Now, you can demo websites without deploying.

References

share-your-code's People

Contributors

francoislamiedepain avatar

Stargazers

 avatar

Watchers

 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.