These are chat archives for less/less.js

15th
Aug 2017
mrnategeek
@mrnategeek
Aug 15 2017 13:55
Who is using NodeJS?
Joshua Austill
@jlaustill
Aug 15 2017 13:56
@mrnategeek pretty much everyone these days :)
mrnategeek
@mrnategeek
Aug 15 2017 13:56
Because I tried to get less to work with its HTTP function but its not working
mrnategeek
@mrnategeek
Aug 15 2017 14:04
Now I got this error
SyntaxError: missing ) after argument list
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:141:18)
at node.js:933:3
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:20
@mrnategeek I use NodeJS
can you post your code
mrnategeek
@mrnategeek
Aug 15 2017 14:22
I don't know, I really don't want it in public. If there is a way to send it to you privately, I will
Wait
Before I do, is there a renderFile function on less like jade does?
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:24
it will be hard to get help otherwise
mrnategeek
@mrnategeek
Aug 15 2017 14:25
People that does not know how to program can steal my code and try to use it thinking they created it
Ian Paschal
@ianpaschal
Aug 15 2017 14:26
People who do not know how to program will not be able to use your currently not-working code, will they. And those who know how to fix the problem you’re having are already ahead of you anyway. ;)
mrnategeek
@mrnategeek
Aug 15 2017 14:27
Here is a part of the code, its less and how can I echo the contents with one line
        less.render(data.toString(), {}, function(error, output){
            if(!error){
                console.log(output.css);
            }
        });
data.toString() is apart of the http function
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:29
@ianpaschal LMAO
mrnategeek
@mrnategeek
Aug 15 2017 14:32
My brother told me its easier to program via NodeJS than the PHP Web server but I don't know, Nodejs loads faster then PHP Web server
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:33
looks like your function has to many parameters
mrnategeek
@mrnategeek
Aug 15 2017 14:34
What function or library do you use for this?
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:34
well i assume you are just passing an empty configuration as the 2nd parameter
mrnategeek
@mrnategeek
Aug 15 2017 14:35
that is for the options, does that count. It works perfectly via console.log but the req.write (HTTP) is where the error occurs
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:35
what is contained in data.toString()
mrnategeek
@mrnategeek
Aug 15 2017 14:36
That is the data returned in the http function
Davis Sylvester
@DavisSylvester
Aug 15 2017 14:36
i don't see a request (req: Request) anywhere in your code!
mrnategeek
@mrnategeek
Aug 15 2017 14:38
Is there a less compiler for nodejs that only uses one line and echos its output directly to the console (return)
Wait, replace data.toString() with this "body{ color:rgb(255,255,255); }"
  • I going to try to do something
mrnategeek
@mrnategeek
Aug 15 2017 14:50
I see what the error is, exiting the chat now...