Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Emre Surmeli
    @emresurmeli

    var http = require("http"),
    fs = require('fs');

    function loadMyHTML (err, html) {
    if (err) {
    throw err;
    console.log("ther was an error");
    }
    http.createServer(function(request, response) {
    response.writeHeader(200, {"Content-Type": "text/html"});
    response.write(html);
    response.end();
    }).listen(3000, "localhost");
    };

    fs.readFile('./index.html', loadMyHTML);

    console.log("server starting. available at http://localhost3000");

    Emre Surmeli
    @emresurmeli
    code
    <!DOCTYPE>
    <html>
    <head>
      <title>Text to XML</title>
    </head>
    <style>
    #drop {
      min-height: 150px;
      width: 250px;
      border: 1px solid blue;
      margin: 10px;
      padding: 10px;
    }
    </style>
    <body>
      <h1 align=center>Turn your text to XML</h1>
      <DIV id="status">Drag the files from a folder to a selected area ...</DIV>
    
      <DIV id="drop">Drop files here.</DIV>
      <DIV id="list"></DIV>
      <script type="text/javascript">
        var getButton = document.getElementById("btn");
            getButton.addEventListener("click", function() {
    
        });
    
      </script>
    </body>
    <script type="text/javascript" src="server.js"></script>
    </html>