<?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>Forem: Saad Majeed</title>
    <description>The latest articles on Forem by Saad Majeed (@saadmajeed).</description>
    <link>https://forem.com/saadmajeed</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%2F3885509%2F594ec33f-d229-4945-a0f2-1a849daa0fce.jpg</url>
      <title>Forem: Saad Majeed</title>
      <link>https://forem.com/saadmajeed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/saadmajeed"/>
    <language>en</language>
    <item>
      <title>Routing in BushJS - NodeJS framework</title>
      <dc:creator>Saad Majeed</dc:creator>
      <pubDate>Mon, 20 Apr 2026 14:38:23 +0000</pubDate>
      <link>https://forem.com/saadmajeed/routing-in-bushjs-nodejs-framework-264m</link>
      <guid>https://forem.com/saadmajeed/routing-in-bushjs-nodejs-framework-264m</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55tdfhu6o8fbsiu7yln9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55tdfhu6o8fbsiu7yln9.jpg" alt=" " width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Routing in BushJS (HTTP):&lt;br&gt;
BushJS has a very easy and simple way to handle routing.&lt;br&gt;
For basic routes, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app.get(path, handler)&lt;br&gt;
app.post(path, handler)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;path → the route URL (e.g. /users)&lt;br&gt;
handler → the function that runs when the route is called&lt;/p&gt;

&lt;p&gt;But HTTP has more methods than just GET and POST.&lt;br&gt;
To use all methods, you can access the router:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app.router.get(path, handler)&lt;br&gt;
app.router.post(path, handler)&lt;br&gt;
app.router.put(path, handler)&lt;br&gt;
app.router.delete(path, handler)&lt;br&gt;
app.router.any(path, handler)&lt;br&gt;
app.router.resource(name, controller)&lt;br&gt;
app.router.apiResource(name, controller)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app.get('/users', (req, res) =&amp;gt; {&lt;br&gt;
  res.send('All users')&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;})&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Meet BushJS, a new Nodejs framework</title>
      <dc:creator>Saad Majeed</dc:creator>
      <pubDate>Sat, 18 Apr 2026 05:36:47 +0000</pubDate>
      <link>https://forem.com/saadmajeed/meet-bushjs-a-new-nodejs-framework-1ip8</link>
      <guid>https://forem.com/saadmajeed/meet-bushjs-a-new-nodejs-framework-1ip8</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Welcome to BushJS&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I'm a Nodejs framework built on top of Express.js and MongoDB. Right now, I'm for APIs only, so you will be using me to develop RESTful APIs, GraphQL, and WebSocket endpoints.&lt;/p&gt;

&lt;p&gt;I do support Models, Controllers, Requests, Responses, routes, migrations, seeders, and many more.&lt;/p&gt;

&lt;p&gt;Wanna try me? But hear! I do support CLI commands that will boost your productivity.&lt;/p&gt;

&lt;p&gt;You can install my CLI by running this command:&lt;br&gt;
&lt;code&gt;npm install -g bushjs-cli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After installing this, you will obviously create a new project via this command:&lt;br&gt;
&lt;code&gt;npx bush new &amp;lt;project-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command will create a new folder/directory with the name of the project you gave in the command. Step into that folder/directory and run this npm command just like normal ones&lt;br&gt;
&lt;code&gt;npm install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As we know, this will install the required dependencies into the node_modules folder/directory that runs our Nodejs project.&lt;/p&gt;

&lt;p&gt;Now what? No headache! Run this command to run our new BushJS project just as usual:&lt;br&gt;
&lt;code&gt;npm run dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Is it final? Absolutely not! BushJS means I do support my built-in commands for other operations, like creating controllers, routes, models, migrations, seeders, and many more.&lt;br&gt;
&lt;code&gt;node bush &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Did you find me interesting? Let's dive deeper into the docs!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/SaadMajeed565/BushJS/blob/main/docs/README.md" rel="noopener noreferrer"&gt;BushJS Docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also search me on &lt;a href="https://www.npmjs.com/package/bushjs?activeTab=readme" rel="noopener noreferrer"&gt;NPMJS Website&lt;/a&gt;&lt;br&gt;
and this &lt;a href="https://www.npmjs.com/package/bushjs-cli?activeTab=readme" rel="noopener noreferrer"&gt;BushJS CLI&lt;/a&gt; too!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>node</category>
    </item>
  </channel>
</rss>
