I have a firebase project developed in javscript html and css that works like a social network, i have users in my database and these users have profile information to show.
What you're describing is a single-page application, where a single HTML+JavaScript page is handling many URLS - dynamically generating the content.
You'll need to implement multiple steps:
Configure Firebase Hosting to direct multiple incoming URLs to the same HTML page. This is done with a rewrite rule in your firebase.json
file, such as:
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]
Now the JavaScript of your index.html
page can inspect the URL in window.location.href
, extract the user name from it, and then serve the correct content for that user.