title: How to deploy functions from other directory than '/functions'?
body: <p>David in his repo:</p>
  
  <p><a href="https://github.com/davideast/react-ssr-firebase-hosting" rel="noreferrer">https://github.com/davideast/react-ssr-firebase-hosting</a></p>
  
  <p>has the file with firebase functions <code>index.js</code> in the main root, <strong>not</strong> in the <code>/functions</code> directory.</p>
  
  <p>However, if I do the same and drop my <code>index.js</code> file to main root, if I do <code>firebase deploy --only functions</code> it says in the console: </p>
  
  <pre><code>i  deploying functions
  
  Error: functions\index.js does not exist, can't deploy Firebase Functions
  </code></pre>
  
  <p><strong>Q</strong>: How is it possible that he made it work? How can I do the same and deploy successfully functions from other dir than <code>/functions</code>?</p>
  
  <p>Thanks</p>
  
  <p><code>firebase.json</code></p>
  
  <pre><code>{
    "hosting": {
      "public": "build",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ],
      "rewrites": [
        {
          "source": "**",
          "function": "ssrapp"
        }
      ]
    },
    "functions": {
       "source": "/"
    }
  }
  </code></pre>