<?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: Elijah Darkeh Agbedam</title>
    <description>The latest articles on DEV Community by Elijah Darkeh Agbedam (@darkeh).</description>
    <link>https://dev.to/darkeh</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%2F985637%2Fb7123449-761a-4a25-bcf1-8c2e9fb16e39.jpeg</url>
      <title>DEV Community: Elijah Darkeh Agbedam</title>
      <link>https://dev.to/darkeh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darkeh"/>
    <language>en</language>
    <item>
      <title>How to Set Up a Node.js TypeScript Backend from Scratch</title>
      <dc:creator>Elijah Darkeh Agbedam</dc:creator>
      <pubDate>Sun, 05 Apr 2026 18:53:06 +0000</pubDate>
      <link>https://dev.to/darkeh/how-to-set-up-a-nodejs-typescript-backend-from-scratch-21i6</link>
      <guid>https://dev.to/darkeh/how-to-set-up-a-nodejs-typescript-backend-from-scratch-21i6</guid>
      <description>&lt;p&gt;If you've been writing JavaScript for a while, you've probably heard people talk about TypeScript. It adds static types to JavaScript, which means you catch bugs before running your code, get better autocomplete in your editor, and write more self-documenting code. In this post, we'll set up a clean Node.js + Express backend using TypeScript from scratch, the same setup I use as a starting point for my own projects.&lt;/p&gt;

&lt;p&gt;By the end, you'll have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An Express server running TypeScript&lt;/li&gt;
&lt;li&gt;Hot-reload in development (save a file and server restarts automatically)&lt;/li&gt;
&lt;li&gt;A clean separation between dev and production workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;: Node.js installed, basic JavaScript knowledge. That's it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 — Initialize the Project
&lt;/h2&gt;

&lt;p&gt;Create a new folder for your project and initialize a package.json:&lt;br&gt;
&lt;code&gt;mkdir my-backend &amp;amp;&amp;amp; cd my-backend&lt;br&gt;
pnpm init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Don't have pnpm? Install it with &lt;code&gt;npm install -g pnpm&lt;/code&gt;, or just replace pnpm with npm throughout this post.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 — Install Dependencies
&lt;/h2&gt;

&lt;p&gt;Install the production dependencies:&lt;br&gt;
&lt;code&gt;pnpm add express dotenv&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;express&lt;/code&gt; — the web framework we'll use to handle HTTP requests&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;dotenv&lt;/code&gt; — loads environment variables from a .env file (so you can store things like your port number or API keys outside your code)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now install the development dependencies:&lt;br&gt;
&lt;code&gt;pnpm add -D typescript ts-node nodemon @types/node @types/express&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
These are only needed while building the project, not when running it in production:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;typescript&lt;/code&gt; — the TypeScript compiler that turns .ts files into plain JavaScript&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ts-node&lt;/code&gt; — lets you run .ts files directly without compiling first (great for development)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nodemon&lt;/code&gt; — watches your files and automatically restarts the server when you save a change&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@types/node&lt;/code&gt; and &lt;code&gt;@types/express&lt;/code&gt; — type definitions that teach TypeScript what Node.js and Express APIs look like&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3 — Configure TypeScript
&lt;/h2&gt;

&lt;p&gt;Create a tsconfig.json file at the root of your project:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "compilerOptions": {&lt;br&gt;
    "target": "ES2020",&lt;br&gt;
    "module": "commonjs",&lt;br&gt;
    "rootDir": "src",&lt;br&gt;
    "outDir": "dist",&lt;br&gt;
    "strict": true,&lt;br&gt;
    "esModuleInterop": true,&lt;br&gt;
    "skipLibCheck": true,&lt;br&gt;
    "forceConsistentCasingInFileNames": true&lt;br&gt;
  },&lt;br&gt;
  "include": ["src"]&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Here's what the key options mean:&lt;br&gt;
target: "ES2020" - Compile to modern JavaScript (Node.js 14+ supports this)&lt;br&gt;
rootDir: "src"  - TypeScript source files live in the src/ folder&lt;br&gt;
outDir: "dist"  - Compiled JavaScript output goes into dist/&lt;br&gt;
strict: true    - Turns on strict type checking — catches more bugs&lt;br&gt;
esModuleInterop: true   - Lets you use import x from 'y' syntax with CommonJS packages&lt;br&gt;
skipLibCheck: true - Skips type checking inside node_modules — avoids noisy errors&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 — Configure Nodemon
&lt;/h2&gt;

&lt;p&gt;Create a nodemon.json file at the root:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;{&lt;br&gt;
  "watch": ["src"],&lt;br&gt;
  "ext": "ts,json",&lt;br&gt;
  "ignore": ["dist"],&lt;br&gt;
  "exec": "pnpm exec ts-node src/index.ts"&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;watch: ["src"] — only watch the src/ folder for changes&lt;/li&gt;
&lt;li&gt;ext: "ts,json" — restart when .ts or .json files change&lt;/li&gt;
&lt;li&gt;ignore: ["dist"] — don't watch the compiled output folder (this would cause an infinite restart loop)&lt;/li&gt;
&lt;li&gt;exec — the command to run when a change is detected; we use pnpm exec ts-node to run TypeScript directly&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5 — Add Scripts to package.json
&lt;/h2&gt;

&lt;p&gt;Update your package.json scripts section:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"scripts": {&lt;br&gt;
  "dev": "nodemon",&lt;br&gt;
  "build": "tsc",&lt;br&gt;
  "start": "node dist/index.js"&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dev — starts nodemon, which runs your TypeScript directly with hot-reload&lt;/li&gt;
&lt;li&gt;build — compiles your TypeScript to JavaScript in dist/&lt;/li&gt;
&lt;li&gt;start — runs the compiled JavaScript (for production)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 6 — Set Up Environment Variables
&lt;/h2&gt;

&lt;p&gt;Create a .env file at the root:&lt;br&gt;
&lt;code&gt;PORT=4000&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Then create a .gitignore file (you don't want to commit your secrets or compiled files):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;node_modules/&lt;br&gt;
dist/&lt;br&gt;
.env&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7 — Write the Server
&lt;/h2&gt;

&lt;p&gt;Create a src/ folder, then create src/index.ts:&lt;/p&gt;

&lt;p&gt;`import application from "express";&lt;br&gt;
import { configDotenv } from "dotenv";&lt;/p&gt;

&lt;p&gt;configDotenv();&lt;/p&gt;

&lt;p&gt;const PORT = process.env.PORT || 3000;&lt;/p&gt;

&lt;p&gt;const app = application();&lt;/p&gt;

&lt;p&gt;app.use(application.json());&lt;/p&gt;

&lt;p&gt;app.get("/", (_req, res) =&amp;gt; {&lt;br&gt;
  res.json({ message: "Server is running" });&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;app.listen(PORT, () =&amp;gt; {&lt;br&gt;
  console.log(&lt;code&gt;Server is running at Port ${PORT}&lt;/code&gt;);&lt;br&gt;
});`&lt;/p&gt;

&lt;p&gt;A few things to note:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import application from "express"&lt;/code&gt; — we're importing Express and calling it application. The name after import is just a variable name — you can call it anything you like (express, app, server). The important part is what comes after from.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;configDotenv()&lt;/code&gt; — loads your .env file. This must run before you read process.env.PORT, otherwise the variable won't be set yet.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;application.json()&lt;/code&gt; — middleware that parses incoming JSON request bodies. You'll need this for any POST/PUT endpoints that receive JSON data.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;app.get("/")&lt;/code&gt; — a simple health-check route. When you visit &lt;a href="http://localhost:4000/" rel="noopener noreferrer"&gt;http://localhost:4000/&lt;/a&gt; in your browser, you'll see {"message":"Server is running"}. This is how you'll verify everything is working.&lt;/p&gt;

&lt;p&gt;Step 8 — Run It&lt;br&gt;
Start the development server:&lt;br&gt;
&lt;code&gt;pnpm dev&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
You should see:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[nodemon] 3.1.14&lt;br&gt;
[nodemon] watching path(s): src/**/*&lt;br&gt;
[nodemon] watching extensions: ts,json&lt;br&gt;
[nodemon] starting&lt;/code&gt;pnpm exec ts-node src/index.ts&lt;code&gt;&lt;br&gt;
Server is running at Port 4000&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open your browser and visit &lt;a href="http://localhost:4000/" rel="noopener noreferrer"&gt;http://localhost:4000/&lt;/a&gt; — you should see:&lt;br&gt;
{ "message": "Server is running" }&lt;/p&gt;

&lt;p&gt;When you're ready to build for production:&lt;br&gt;
&lt;code&gt;pnpm build&lt;/code&gt;   - compiles TypeScript → dist/&lt;br&gt;
&lt;code&gt;pnpm start&lt;/code&gt;   - runs the compiled JavaScript&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;You now have a solid foundation: TypeScript, Express, hot-reload in dev, and a clean build pipeline for production. From here you can add routes, connect a database, or add authentication middleware.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>node</category>
      <category>backend</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>How to install java 21 JDK-Early Access Edition</title>
      <dc:creator>Elijah Darkeh Agbedam</dc:creator>
      <pubDate>Tue, 18 Jul 2023 13:58:06 +0000</pubDate>
      <link>https://dev.to/darkeh/how-to-install-java-21-jdk-early-access-edition-13ip</link>
      <guid>https://dev.to/darkeh/how-to-install-java-21-jdk-early-access-edition-13ip</guid>
      <description>&lt;p&gt;Hello, welcome to read this article, I hope you find the best out of it. In this article, I will be listing the steps in installing java 21 JDK. As at the time you are reading this article, JDK 20 is the latest release of Java SE Platform and JDK 17 LTS is the latest long-term support release for the Java SE platform.&lt;/p&gt;

&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%2F33jyprplywsahqxkvwpt.png" 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%2F33jyprplywsahqxkvwpt.png" alt=" " width="800" height="136"&gt;&lt;/a&gt;&lt;br&gt;
The java JDK is an important tool for java developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The following are some uses of this development kit&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Java Development&lt;/li&gt;
&lt;li&gt;Accessibility to Java standard library&lt;/li&gt;
&lt;li&gt;Integration with IDEs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now Let's take a look at the steps in order to get the java 21 JDK (This articles applies to windows users)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to &lt;a href="https://jdk.java.net/21/" rel="noopener noreferrer"&gt;https://jdk.java.net/21/&lt;/a&gt; (Applies to users on other OS)&lt;/li&gt;
&lt;li&gt;Install the Windows version of the JDK( which is a zip file )&lt;/li&gt;
&lt;li&gt;Extract the zip file to access jdk-21 folder ( This folder contains all the necessary tools such as the Java compiler, Java Runtime Environment etc.&lt;/li&gt;
&lt;li&gt;Copy the path to the jdk-21.&lt;/li&gt;
&lt;li&gt;Open the the start menu and search for "Environment Variables. Open the "Edit the system environment variables" option.&lt;/li&gt;
&lt;/ul&gt;

&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%2F5i1hi9a0cefhdendt97r.PNG" 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%2F5i1hi9a0cefhdendt97r.PNG" alt=" " width="401" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to system variable section and select "New"&lt;/li&gt;
&lt;li&gt;In the variable name enter "JAVA_HOME" and enter the path you copied in step 4 into the variable value field.&lt;/li&gt;
&lt;li&gt;Click okay
&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%2F5d5d5xvjmnvqq0slgkkc.PNG" alt=" " width="673" height="173"&gt;
&lt;/li&gt;
&lt;li&gt;Finally, let's add the path  to the bin by selecting path then new under the same system variable and then paste and append \bin to the link copied in step 4. Select okay.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Great!!! you have successfully setup java 21 JDK on your machine. Test it out by opening the terminal and using "java --version" to test it out.&lt;/p&gt;

&lt;p&gt;Don't forget to leave a feedback.&lt;/p&gt;

</description>
      <category>java</category>
    </item>
  </channel>
</rss>
