How to pass a url as a parameter? [Solved]

Hi, every one. I stuck in URL Shortener Microservice challenge. I dont know how to pass a url as a parameter in project.

Ex: i type and it response: cannot GET /

thanks all.

What have you tried?

Are you aware of the syntax for parsing parameters from URLs in Express?

You can use a wild ward to solve this issue :

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

app.get("/*", function(req, res) {
    var url = req.params[0];
    console.log(url); //




Thank you guys i solved this problems :smiley:

Thank you so much! I’m working on my project and this helped me tremendously! :slight_smile:

1 Like

Please can you help with this.