<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: azeez</title>
    <description>The latest articles on DEV Community by azeez (@iamazeez).</description>
    <link>https://dev.to/iamazeez</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F448875%2Fef7a49ba-0241-42f1-9ccf-cbef484fd863.png</url>
      <title>DEV Community: azeez</title>
      <link>https://dev.to/iamazeez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamazeez"/>
    <language>en</language>
    <item>
      <title>Deploy express server in 8 simple step using firebase</title>
      <dc:creator>azeez</dc:creator>
      <pubDate>Wed, 08 Mar 2023 18:23:11 +0000</pubDate>
      <link>https://dev.to/iamazeez/deploy-express-server-in-8-simple-step-using-firebase-37l5</link>
      <guid>https://dev.to/iamazeez/deploy-express-server-in-8-simple-step-using-firebase-37l5</guid>
      <description>&lt;p&gt;I wanted to create a web server but don't wanted to go with AWS so I checkout firebase and here is how I created api using firebase function and deploy it to live.&lt;/p&gt;

&lt;p&gt;To configure an Express server for Firebase Functions, follow these steps: &lt;/p&gt;

&lt;p&gt;1- Create a Firebase project: Go to the Firebase Console (on the top right you can see the console button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0PBSnb6S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnhhcxzidcq59vaugxw7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0PBSnb6S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mnhhcxzidcq59vaugxw7.png" alt="Image description" width="880" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2- create a new project, and give it a name. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--47HecfJC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b66c491g6ogpa0pqcluh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--47HecfJC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b66c491g6ogpa0pqcluh.png" alt="Image description" width="747" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3- Install Firebase CLI in your terminal : Enter the Firebase CLI with the following commands: Copy code &lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install -g firebase-tools&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;4- Start Firebase project: In the &lt;br&gt;
terminal, navigate to the root directory of your Node.js project and run the following commands use the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;firebase init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5- Follow the prompts to start your Firebase project. Select the Firebase features you want to use and select the Firebase project you created earlier. &lt;/p&gt;

&lt;p&gt;6- Install Express: Install Express using the following command: &lt;code&gt;npm install express&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;7- Configure the Express server: Create a new file called index.js in your project directory and add the following code: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;const express = require( 'express' . ); &lt;br&gt;
const app = show(); &lt;br&gt;
// Define your API methods here app.get('/hello', (req, res) =&amp;gt; { res.send('Hello from Express!'); &lt;br&gt;
});&lt;br&gt;
exports.api = functions.https.onRequest(app);&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;8- Deploy the Express server: Deploy your Express server to Firebase using the following command:&lt;br&gt;
&lt;code&gt;firebase deploy --only functions&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once your Firebase project is deployed, you should be able to access your Express server endpoints using the URL provided by the Cloud Functions. For example, we have created a route at /hello, you can access it at &lt;br&gt;
&lt;code&gt;https://&amp;lt;your-region&amp;gt;-&amp;lt;your-project-id&amp;gt;.cloudfunctions.net/api/users&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; that you may need to configure CORS headers in your Express app to allow cross-origin requests.&lt;/p&gt;

</description>
      <category>node</category>
      <category>firebase</category>
      <category>javascript</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
