Monday 12 June 2017

Cannot get/ mean

    this is my index.html page:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Crud</title>
    </head>
    <body>
     <form action="/quotes" method="POST">
        <input type="text" name="name" placeholder="name">
        <input type="text" name="quote" placeholder="quote">
        <button type="submit">Submit</button>
     </form>
    </body>
    </html>


    this is my server.js page:

    const express = require('express')
    const app = express();

    app.listen(3000,function(){
        console.log('listening on 3000')
    })

    app.post('/quotes', (req,res) => {
       console.log("hii")
    })

I am new to mean, so i decided to create crud operation, i did not get console.log message in my browser. Help me to get started.



via Mohamed Sameer

No comments:

Post a Comment