{"id":27967,"date":"2023-01-03T16:39:15","date_gmt":"2023-01-03T11:09:15","guid":{"rendered":"https:\/\/mobisoftinfotech.com\/resources\/?p=27967"},"modified":"2025-04-30T11:24:59","modified_gmt":"2025-04-30T05:54:59","slug":"set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier","status":"publish","type":"post","link":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier","title":{"rendered":"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier"},"content":{"rendered":"<p>These days for all serious Node JS projects, it&#8217;s recommended to use TypeScript. With TypeScript, VS Code offers a lot of powerful refactoring features. These features are especially useful in large projects where you want to be sure that you are not breaking existing code while refactoring.<\/p>\n\n\n\n<p>In this tutorial we will see how to set up a Node and Express JS project with TypeScript, ESList and Prettier. ESLint makes sure that the code is written in consistent style and Prettier gives nice formatting without a lot of effort from your side. Both of these features are very important when multiple developers work on the same project.<\/p>\n\n\n\n<p>To get started follow these steps, to create a Node JS project:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir backend\ncd backend\nnpm init -y\n<\/pre>\n\n\n\n<p>Now let&#8217;s set up TypeScript, ESLint and Prettier.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install --save-dev @types\/node @typescript-eslint\/eslint-plugin \\\n@typescript-eslint\/parser eslint eslint-config-prettier eslint-plugin-import \\\neslint-plugin-prettier prettier ts-node typescript\n<\/pre>\n\n\n\n<p><b>File: tsconfig.json<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n  \"compilerOptions\": {\n    \"target\": \"es6\",\n    \"lib\": [\"es5\", \"es6\", \"dom\"],\n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"baseUrl\": \"src\/\",\n    \"typeRoots\": [\".\/src\/types\", \".\/node_modules\/@types\"],\n    \"resolveJsonModule\": true,\n    \"outDir\": \".\/dist\",\n    \"removeComments\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"strict\": true,\n    \"noImplicitReturns\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\".\/src\/**\/*.tsx\", \".\/src\/**\/*.ts\"],\n  \"exclude\": [\"node_modules\", \"test\/**\/*.ts\"]\n}\n<\/pre>\n\n\n\n<p><b>File: .eslintrc<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n    \"parser\": \"@typescript-eslint\/parser\",\n    \"extends\": [\n        \"plugin:@typescript-eslint\/recommended\",\n        \"prettier\"\n    ],\n    \"plugins\": [\"prettier\"],\n    \"parserOptions\": {\n        \"ecmaVersion\": 2018,\n        \"sourceType\": \"module\"\n    },\n    \"rules\": {\n        \"prettier\/prettier\": \"error\"\n    }\n}<\/pre>\n\n\n\n<p><b>File: .prettierrc.json<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n  \"tabWidth\": 2,\n  \"semi\": false,\n  \"singleQuote\": true,\n  \"trailingComma\": \"none\",\n  \"printWidth\": 120\n}<\/pre>\n\n\n\n<p>Create the <code>src<\/code> folder and <code>index.ts<\/code> file to it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir src\n<\/pre>\n\n\n\n<p><b>File: src\/index.ts<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">console.log(\"Hello World\");\n<\/pre>\n\n\n\n<p>VS Code should show you errors from Prettier and ESLint. Now let&#8217;s create the npm scripts to run ESLint and Prettier.<\/p>\n\n\n\n<p><b>File: package.json<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n    \"scripts\": {\n        \"lint\": \"eslint src\/**\/*.ts\",\n        \"format\": \"eslint src\/**\/*.ts --fix\"\n    },\n...\n<\/pre>\n\n\n\n<p>Now you can run `npm run format` and `npm run lint` to format the code and check for the linting issues.<\/p>\n\n\n\n<p>Let&#8217;s install nodemon and add the scripts to run the project in dev and prod mode.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install --save-dev nodemon\n<\/pre>\n\n\n\n<p>For nodemon we need to create the <code>nodemon.json<\/code> settings file.<\/p>\n\n\n\n<p><b>File: nodemon.json<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\n    \"ext\": \".ts, .js, .yaml\"\n}\n<\/pre>\n\n\n\n<p>This tells nodemon to watch for typescript, javascript and yaml files for changes to reload the project.<\/p>\n\n\n\n<p><b>File: package.json<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">...\n\"scripts\": {\n    \"build\": \"npx tsc\",\n    \"start\": \"TZ='UTC' node dist\/index.js\",\n    \"dev\": \"TZ='UTC' nodemon src\/index.ts\",\n    \"lint\": \"eslint src\/**\/*.ts\",\n    \"format\": \"eslint src\/**\/*.ts --fix\"\n},\n...\n<\/pre>\n\n\n\n<p>Here note that we are setting the <code>TZ='UTC'<\/code> environment variable before running the node command. This ensures that the node process uses UTC timezone rather than using your machine&#8217;s timezone. It&#8217;s important to run your server process with UTC timezone. This ensures that you can deal with users from multiple time zones easily.<\/p>\n\n\n\n<p>Now to run in production mode:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm run build\nnpm run start\n<\/pre>\n\n\n\n<p>To run in dev mode:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm run dev\n<\/pre>\n\n\n\n<p>You should see the text &#8220;Hello World&#8221; printed on the console.<\/p>\n\n\n\n<p>Now let&#8217;s add Express JS to the project.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm install --save express body-parser\n\nnpm install --save-dev @types\/express\n<\/pre>\n\n\n\n<p>Let&#8217;s add the route to our index file:<\/p>\n\n\n\n<p><b>File: src\/index.ts<\/b><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import express, { Express, Request, Response } from 'express'\nimport bodyParser from 'body-parser'\n\nconst app: Express = express()\n\napp.use(bodyParser.urlencoded({ extended: false }))\napp.use(bodyParser.json())\n\napp.get('\/', (req: Request, res: Response) =&gt; {\n  res.json({ message: 'Hello World!' })\n})\n\napp.listen(8080, async () =&gt; {\n  console.log('Server is running at http:\/\/localhost:8080')\n})\n<\/pre>\n\n\n\n<p>Start the project with<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">npm run dev\n<\/pre>\n\n\n\n<p>Then access the API using curl command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">curl --location --request GET 'http:\/\/localhost:8080\/'\n<\/pre>\n\n\n\n<p>It should print the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">{\"message\":\"Hello World!\"}\n<\/pre>\n\n\n\n<p>That&#8217;s it. Now we have an Express JS project running with TypeScript. Hopefully this will help you to get started with TypeScript in your next Node JS project.<\/p>\n\n\n\n<p>To download the finished project source code, please click <a href=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/node-js-backend-with-typescript.zip\">here.<\/a><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/mobisoftinfotech.com\/contact-us?utm_source=blog&amp;utm_medium=referral&amp;utm_campaign=set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier-cta1\"><noscript><img decoding=\"async\" width=\"800\" height=\"340\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/03\/cta2.jpg\" alt class=\"wp-image-37688\"><\/noscript><img decoding=\"async\" width=\"800\" height=\"340\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20340%22%3E%3C%2Fsvg%3E\" alt class=\"wp-image-37688 lazyload\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2025\/03\/cta2.jpg\"><\/a><\/figure>\n\n\n<div class=\"modern-author-card\">\n    <div class=\"author-card-content\">\n        <div class=\"author-info-section\">\n            <div class=\"author-avatar\">\n                <noscript><img decoding=\"async\" src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2022\/04\/Pritam1.jpg\" alt=\"Pritam Barhate\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"Pritam Barhate\" data-src=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2022\/04\/Pritam1.jpg\" class=\" lazyload\">\n            <\/div>\n            <div class=\"author-details\">\n                <h3 class=\"author-name\">Pritam Barhate<\/h3>\n                <p class=\"author-title\">Head of Technology Innovation<\/p>\n                <a href=\"javascript:void(0);\" class=\"read-more-link read-more-btn\" onclick=\"toggleAuthorBio(this); return false;\">Read more <noscript><img decoding=\"async\" src=\"\/assets\/images\/blog\/Vector.png\" alt=\"expand\" class=\"read-more-arrow down-arrow\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"expand\" class=\"read-more-arrow down-arrow lazyload\" data-src=\"\/assets\/images\/blog\/Vector.png\"><\/a>\n                <div class=\"author-bio-expanded\">\n                    <p>Pritam Barhate, with an experience of 14+ years in technology, heads Technology Innovation at <a href=\"https:\/\/mobisoftinfotech.com\" target=\"_blank\" rel=\"noopener\">Mobisoft Infotech<\/a>. He has a rich experience in design and development. He has been a consultant for a variety of industries and startups. At Mobisoft Infotech, he primarily focuses on technology resources and develops the most advanced solutions.<\/p>\n                    <div class=\"author-social-links\">\n                        <div class=\"social-icon\">\n                            <a href=\"https:\/\/www.linkedin.com\/in\/pritam-barhate-90b93414\/\" target=\"_blank\" rel=\"nofollow noopener\"><i class=\"icon-sprite linkedin\"><\/i><\/a>\n                            <a href=\"https:\/\/twitter.com\/pritambarhate\" target=\"_blank\" rel=\"nofollow noopener\"><i class=\"icon-sprite twitter\"><\/i><\/a>\n                        <\/div>\n                    <\/div>\n                    <a href=\"javascript:void(0);\" class=\"read-more-link read-less-btn\" onclick=\"toggleAuthorBio(this); return false;\" style=\"display: none;\">Read less <noscript><img decoding=\"async\" src=\"\/assets\/images\/blog\/Vector.png\" alt=\"collapse\" class=\"read-more-arrow up-arrow\"><\/noscript><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" alt=\"collapse\" class=\"read-more-arrow up-arrow lazyload\" data-src=\"\/assets\/images\/blog\/Vector.png\"><\/a>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"share-section\">\n            <span class=\"share-label\">Share Article<\/span>\n            <div class=\"social-share-buttons\">\n                <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fset-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\" target=\"_blank\" class=\"share-btn facebook-share\"><i class=\"fa fa-facebook-f\"><\/i><\/a>\n                <a href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fmobisoftinfotech.com%2Fresources%2Fblog%2Fset-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\" target=\"_blank\" class=\"share-btn linkedin-share\"><i class=\"fa fa-linkedin\"><\/i><\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>These days for all serious Node JS projects, it&#8217;s recommended to use TypeScript. With TypeScript, VS Code offers a lot of powerful refactoring features. These features are especially useful in large projects where you want to be sure that you are not breaking existing code while refactoring. In this tutorial we will see how to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":27987,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[286],"tags":[3624],"class_list":["post-27967","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-create-a-node-js-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier<\/title>\n<meta name=\"description\" content=\"Check this tutorial on how to create a Node JS and Express JS project from scratch. Also, learn how to set up TypeScript, ESLint, and Prettier with an easy-to-understand step-by-step process.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier\" \/>\n<meta property=\"og:description\" content=\"Check this tutorial on how to create a Node JS and Express JS project from scratch. Also, learn how to set up TypeScript, ESLint, and Prettier with an easy-to-understand step-by-step process.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\" \/>\n<meta property=\"og:site_name\" content=\"Mobisoft Infotech\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-03T11:09:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-30T05:54:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/og-Set-up-Node-and-Express-JS-project-from-scratch.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"525\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Pritam Barhate\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/og-Set-up-Node-and-Express-JS-project-from-scratch.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pritam Barhate\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#article\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\"},\"author\":{\"name\":\"Pritam Barhate\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee\"},\"headline\":\"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier\",\"datePublished\":\"2023-01-03T11:09:15+00:00\",\"dateModified\":\"2025-04-30T05:54:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\"},\"wordCount\":412,\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png\",\"keywords\":[\"create a Node JS project\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\",\"name\":\"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier\",\"isPartOf\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png\",\"datePublished\":\"2023-01-03T11:09:15+00:00\",\"dateModified\":\"2025-04-30T05:54:59+00:00\",\"author\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee\"},\"description\":\"Check this tutorial on how to create a Node JS and Express JS project from scratch. Also, learn how to set up TypeScript, ESLint, and Prettier with an easy-to-understand step-by-step process.\",\"breadcrumb\":{\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png\",\"contentUrl\":\"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png\",\"width\":855,\"height\":392,\"caption\":\"Set up Node and Express JS project from scratch\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mobisoftinfotech.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#website\",\"url\":\"https:\/\/mobisoftinfotech.com\/resources\/\",\"name\":\"Mobisoft Infotech\",\"description\":\"Discover Mobility\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee\",\"name\":\"Pritam Barhate\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g\",\"caption\":\"Pritam Barhate\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier","description":"Check this tutorial on how to create a Node JS and Express JS project from scratch. Also, learn how to set up TypeScript, ESLint, and Prettier with an easy-to-understand step-by-step process.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier","og_locale":"en_US","og_type":"article","og_title":"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier","og_description":"Check this tutorial on how to create a Node JS and Express JS project from scratch. Also, learn how to set up TypeScript, ESLint, and Prettier with an easy-to-understand step-by-step process.","og_url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier","og_site_name":"Mobisoft Infotech","article_published_time":"2023-01-03T11:09:15+00:00","article_modified_time":"2025-04-30T05:54:59+00:00","og_image":[{"width":1000,"height":525,"url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/og-Set-up-Node-and-Express-JS-project-from-scratch.png","type":"image\/png"}],"author":"Pritam Barhate","twitter_card":"summary_large_image","twitter_image":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/og-Set-up-Node-and-Express-JS-project-from-scratch.png","twitter_misc":{"Written by":"Pritam Barhate","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#article","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier"},"author":{"name":"Pritam Barhate","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee"},"headline":"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier","datePublished":"2023-01-03T11:09:15+00:00","dateModified":"2025-04-30T05:54:59+00:00","mainEntityOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier"},"wordCount":412,"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png","keywords":["create a Node JS project"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier","url":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier","name":"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier","isPartOf":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage"},"image":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage"},"thumbnailUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png","datePublished":"2023-01-03T11:09:15+00:00","dateModified":"2025-04-30T05:54:59+00:00","author":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee"},"description":"Check this tutorial on how to create a Node JS and Express JS project from scratch. Also, learn how to set up TypeScript, ESLint, and Prettier with an easy-to-understand step-by-step process.","breadcrumb":{"@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#primaryimage","url":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png","contentUrl":"https:\/\/mobisoftinfotech.com\/resources\/wp-content\/uploads\/2023\/01\/Set-up-Node-and-Express-JS-project-from-scratch.png","width":855,"height":392,"caption":"Set up Node and Express JS project from scratch"},{"@type":"BreadcrumbList","@id":"https:\/\/mobisoftinfotech.com\/resources\/blog\/set-up-node-and-express-js-project-from-scratch-with-typescript-eslint-and-prettier#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mobisoftinfotech.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Set up Node and Express JS project from scratch with TypeScript, ESLint and Prettier"}]},{"@type":"WebSite","@id":"https:\/\/mobisoftinfotech.com\/resources\/#website","url":"https:\/\/mobisoftinfotech.com\/resources\/","name":"Mobisoft Infotech","description":"Discover Mobility","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mobisoftinfotech.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mobisoftinfotech.com\/resources\/#\/schema\/person\/fa762036b3364f26abeea146c01487ee","name":"Pritam Barhate","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0e481c7ce54b3567ac70ddfc493523eefce0bdc3ee69fd2654f8f60a79e2f178?s=96&r=g","caption":"Pritam Barhate"}}]}},"_links":{"self":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/27967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/comments?post=27967"}],"version-history":[{"count":17,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/27967\/revisions"}],"predecessor-version":[{"id":37871,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/posts\/27967\/revisions\/37871"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media\/27987"}],"wp:attachment":[{"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/media?parent=27967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/categories?post=27967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mobisoftinfotech.com\/resources\/wp-json\/wp\/v2\/tags?post=27967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}