<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joseph Olayanju on Medium]]></title>
        <description><![CDATA[Stories by Joseph Olayanju on Medium]]></description>
        <link>https://medium.com/@JosephOlayanjuO?source=rss-d134112b81d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*pQ3nQQMfnYdNNH8N</url>
            <title>Stories by Joseph Olayanju on Medium</title>
            <link>https://medium.com/@JosephOlayanjuO?source=rss-d134112b81d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 04:21:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@JosephOlayanjuO/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Scaffold-Express: Bid Farewell to Repetitive Setup Hassles]]></title>
            <link>https://medium.com/@JosephOlayanjuO/scaffold-express-bid-farewell-to-repetitive-setup-hassles-7c197f502e04?source=rss-d134112b81d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c197f502e04</guid>
            <category><![CDATA[boilerplate]]></category>
            <category><![CDATA[expressjs]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[setup-guide]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Joseph Olayanju]]></dc:creator>
            <pubDate>Thu, 24 Aug 2023 14:29:02 GMT</pubDate>
            <atom:updated>2023-08-24T14:29:02.908Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*YSC7MLlQDOfm30giuFWatw.png" /><figcaption>Scaffold-Express</figcaption></figure><p>Have you ever found yourself stuck in a loop of setting up Express.js projects from scratch every time you embark on a new web development adventure? I sure have and I can tell you it can be quite frustrating. It stresses me out especially when I have multiple projects to work on.</p><p>It was one of those frustrating days when it occurred to me that I could create a tool that does the heavy lifting for me. A magic wand that, with a single incantation, conjures up a fully structured Express project with all the essential components ready to roll.</p><p>Introducing <strong>Scaffold-Express </strong>— your ticket to liberating yourself from the confines of repetitive project setup struggles. Join me in this article as I delve into the beginning of Scaffold-Express and showcase its potential to revolutionize your Express.js development journey. Bye-bye to manual setup and welcome to the efficiency of automation.</p><h3><strong>Creating the Scaffold-Express Project</strong></h3><p>A dedication to automation and efficacy characterized the development journey of Scaffold-Express. My goal was to create a tool enabling developers to initiate projects effortlessly, empowering them to focus on the actual coding. The project boasts a standardized folder structure, complete with components, configurations, and even pre-made test files. By automating these initial steps, <strong>Scaffold-Express</strong> has the potential to save developers countless hours and ensure a consistent launching point for their projects.</p><h3><strong>Features and Usage</strong></h3><ol><li><strong>Automated Project Generation</strong>: Say goodbye to the repetitive process of manually creating folders, files, and configurations. Scaffold-Express instantly generates a standardized project structure, including components, tests, configurations, and more. This consistency ensures a solid foundation for your projects, right from the start.</li><li><strong>Dependency Management Made Easy</strong>: Scaffold-Express goes the extra mile by automatically installing common dependencies used in Express.js projects. With a single command, you’ll not only have your project structure ready but also the necessary packages installed, allowing you to jump straight into coding.</li></ol><h3><strong>Getting Started</strong></h3><p>Follow these simple steps to start using <strong>Scaffold-Express</strong>:</p><p><strong>Step 1</strong>: Install Scaffold-Express Globally</p><p>Open your terminal and install the scaffold-express package globally</p><pre>npm install -g scaffold-express</pre><p><strong>Step 2</strong>: Create a New Express Project Navigate to your desired project directory and run the following command:</p><pre>scaffold-express create project-name</pre><p><strong>Step 3</strong>: Begin Coding After Scaffold-Express completes its magic, you’re all set! Inside your newly created project directory, you’ll find the meticulously structured files and folders, along with the automatically installed dependencies. Feel free to start coding right away.</p><p>By automating the repetitive tasks of project creation, Scaffold-Express frees you from the complexities of setting up each project from scratch. Whether you’re a solo developer or part of a team, this tool ensures that your projects are structured uniformly, reducing the risk of errors and saving precious development hours.</p><h3><strong>Benefits for Developers:</strong></h3><p>Scaffold-Express is your secret weapon for increased efficiency and improved development practices. Here’s how it can transform your workflow:</p><ol><li><strong>Time-Saving</strong>: With one simple command, Scaffold-Express generates an entire project structure and installs necessary dependencies. This means less time wasted on setup and more time spent on actual coding.</li><li><strong>Consistency</strong>: Uniform project structures and dependency installation reduce discrepancies across your codebase. This consistency enhances collaboration among team members and simplifies maintenance.</li><li><strong>Code Quality</strong>: Scaffold-Express sets the stage for organized and modular code. By adhering to a predefined structure, you can focus on writing clean, well-structured code that’s easier to understand and maintain.</li><li><strong>Rapid Prototyping</strong>: Whether you’re prototyping a new idea or building a full-fledged application, Scaffold-Express gets you up and running swiftly, turning your concepts into working code faster.</li></ol><h3><strong>Conclusion</strong></h3><p><strong>Scaffold-Expres</strong>s eliminates the hassle of manual project setup, letting you focus on building amazing Express.js applications. With its automated features, customization options, and instant dependency installation, this tool empowers developers to embark on their coding journey with unparalleled ease and efficiency.</p><p>So, what are you waiting for? Give <strong>Scaffold-Express</strong> a spin and experience the transformative power of automated project generation. As you embark on this new coding chapter, we encourage you to provide feedback and suggestions and share your success stories with the community. Together, let’s embrace the future of Express.js development with <strong>Scaffold-Express</strong>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c197f502e04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Node.js File Uploads with VetaCloud]]></title>
            <link>https://medium.com/@JosephOlayanjuO/simplifying-node-js-file-uploads-with-vetacloud-a1092fc434e7?source=rss-d134112b81d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1092fc434e7</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[file-upload]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Joseph Olayanju]]></dc:creator>
            <pubDate>Thu, 13 Jul 2023 11:35:46 GMT</pubDate>
            <atom:updated>2023-07-13T11:35:46.977Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/252/0*Pw_QQUwn5tuzJQ-W.png" /></figure><p><strong>INTRODUCTION</strong></p><p>File uploads are a critical component of many Node.js applications, enabling user contributions, media sharing, data storage, and integration with external services. However, implementing file upload functionality can be challenging, involving secure file handling, input validation, and performance optimization. In this article, we’ll explore VetaCloud, a powerful cloud service that simplifies file uploads in Node.js applications.</p><h3>Understanding VetaCloud</h3><p>VetaCloud is a robust cloud service designed to facilitate secure and effortless file uploads in Node.js. By leveraging VetaCloud, developers can streamline the file upload process and benefit from its scalability, reliability, and security features.</p><h3>Setting up VetaCloud in Node.js</h3><ol><li>Sign up for a VetaCloud account at <a href="https://vetacloud.com/">vetacloud.com</a>.</li><li>Once signed up, navigate to the Routes section and create a new route, specifying the necessary details.</li><li>In the Keys section, locate and copy both the private and public keys associated with your route.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Fp4ihPX1mqujbvMPN_02A.png" /><figcaption>Click on Routes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zj8U4r3Bsmsm-d8HkC8Vg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hE3OqXq_f4D3-WtISY5sRA.png" /><figcaption>Create a new route and fill in our details</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aYoUF4VWYakEID3COwZGxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U-bpYYw6ZUDv1YWOdq7wCQ.png" /><figcaption>After creating new routes, click on Keys and copy both private and pulic key and save them.</figcaption></figure><h3>Implementing File Uploads with VetaCloud</h3><p>To integrate VetaCloud for file uploads in your Node.js application, follow these steps:</p><ol><li>Install the required dependencies by running the following command:</li></ol><pre>npm install axios connect-multiparty</pre><p>2. Create an upload.js file in your controller folder and paste the following code:</p><pre>const fs = require(&#39;fs&#39;);<br>const axios = require(&#39;axios&#39;);<br><br>const uploadFile = function (req, res, next) {<br>  try {<br>    axios({<br>      maxContentLength: Infinity,<br>      maxBodyLength: Infinity,<br>      headers: {<br>        &#39;X_API_KEY&#39;: &#39;&lt;YOUR_PRIVATE_KEY&gt;&#39;,<br>        &#39;X_ROUTE_NAME&#39;: &#39;&lt;YOUR_ROUTE_NAME&gt;&#39;<br>      },<br>      method: &#39;post&#39;,<br>      url: &#39;https://cloud.vetacloud.com/node&#39;,<br>      data: {<br>        file: req.files,<br>        raw: fs.readFileSync(req.files.file.path)<br>      }<br>    }).then(function (response) {<br>      fs.unlinkSync(req.files.file.path);<br>      if (response.status === &#39;error&#39; || response.data.status === &#39;error&#39;) {<br>        console.log(response.data);<br>        return res.status(400).json({<br>          status: 400,<br>          success: false,<br>          message: &#39;Something went wrong&#39;<br>        });<br>      }<br>      return res.status(200).json({<br>        status: 200,<br>        success: true,<br>        message: response.data<br>      });<br>    });<br>  } catch (err) {<br>    console.log(err);<br>    return res.status(500).send({<br>      status: 500,<br>      success: false,<br>      message: &#39;An error occurred&#39;<br>    });<br>  }<br>};<br><br>module.exports = {<br>  uploadFile<br>};</pre><p>3. In the upload route file (e.g., uploadRoute.js), add the following code:</p><pre>const express = require(&#39;express&#39;);<br>const router = express.Router();<br>const { uploadFile } = require(&#39;../controller/uploadController&#39;);<br>const multipart = require(&#39;connect-multiparty&#39;);<br>const multipartMiddleware = multipart();<br><br>// Create route<br>router.post(&#39;/&#39;, multipartMiddleware, uploadFile);<br><br>module.exports = router;</pre><p>4. Finally, in your app.js or main file, make the following changes:</p><pre>const express = require(&#39;express&#39;);<br>const cookieParser = require(&#39;cookie-parser&#39;);<br>const logger = require(&#39;morgan&#39;);<br>const path = require(&#39;path&#39;);<br>const err = require(&#39;http-errors&#39;);<br>const app = express();<br>const port = 3000;<br><br>// Route<br>const uploadRoute = require(&#39;./routes/uploadRoute&#39;);<br><br>// Middleware<br>app.use(logger(&#39;dev&#39;));<br>app.use(express.json());<br>app.use(express.urlencoded({ extended: false }));<br>app.use(cookieParser());<br>app.use(express.static(path.join(__dirname, &#39;public&#39;)));<br><br>// Use route<br>app.use(&#39;/upload&#39;, uploadRoute);<br><br>// Default route<br>app.get(&#39;/&#39;, (req, res) =&gt; {<br>  res.send(&#39;Hello World!&#39;);<br>});<br><br>// Error handling<br>app.use(function (req, res, next) {<br>  next(err(404));<br>});<br><br>app.use(function (err, req, res, next) {<br>  res.status(err.status || 500);<br>  res.send(err.message);<br>});<br><br>// Start server<br>app.listen(port, () =&gt; {<br>  console.log(`Example app listening at http://localhost:${port}`);<br>});</pre><p>Congratulations! You have successfully integrated VetaCloud for file uploads in your Node.js application.</p><h3>Testing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*6wACdw2ZKF9gQO27TqvVuw.png" /><figcaption>Testing on Postman</figcaption></figure><h3>Conclusion</h3><p>In this article, we explored how VetaCloud simplifies file uploads in Node.js applications. By leveraging VetaCloud’s powerful features, such as scalability, reliability, and security, developers can enhance the file upload process and provide a seamless experience for their users. Give VetaCloud a try and see how it can streamline your file upload workflows!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/252/0*ZmugIP2h8P4B6VB0.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1092fc434e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>