You can't use a plain old HTTP function if you want to specify the path of the URL. You'll have to instead create an Express app and hand that over to Cloud Functions for service. The code will look something like this:
const functions = require('firebase-functions');
const express = require('express');
const app = express();
app.get('/helloWorld', (req, res) => {
// your function code here
res.send("hello")
})
exports.api = functions.https.onRequest(app);
Note that /api comes from the name of the export and /helloWorld comes from the path in app.get.
You will also have to install the express module:
npm install express