These are chat archives for Colt/WDB-CodeTalk

1st
Mar 2017
HeadshotsVancouverbc
@vanheadshots_twitter
Mar 01 2017 02:46
Thank you. I did use the inspect tool however. But, still had issues most likely the ? Appreciate the help
Actually, if anyone wants a childish giggle - I used this cat image. Kinda suited the theme better for my twisted mind :) https://i.ytimg.com/vi/cNycdfFEgBc/maxresdefault.jpg
Chris Cullen
@123xylem
Mar 01 2017 03:38

@123xylem


app.post("/addFriend", function(req,res){
    res.send("PostPage!");                                         //Post request HERE
});


app.get("/friends",function(req,res){
    var friends=["sam","bob","sue","baz"];

    res.render("friends",{friends:friends});
});

app.listen(process.env.PORT, process.env.IP,function(){
    console.log("post ON!")
})

Quick Question: When I post a POST request on cloud9 it treats it like a get request and says cant get page...
Ive tested thepost request page in postman and that works but cloud9 wont open it!
WHy!



<form action="/addFriend" mehtod="POST" >

    <input type ="text" placeholder="Friends Name">
    <button>Submit</button>
</form>

^FORM FOR post request

Martine Ross
@moi238
Mar 01 2017 06:39
@123xylem check the spelling of method the t and h are the wrong way wrong. It might be just something that simple.