Step 3: The API saves information in the database, so before running the API you also need to run the database: Step 2: After entering the project’s directory, install the API dependencies js.map) with which the debugger will map the code in JavaScript to the code in TypeScript. Thanks to the sourceMap: true property,TypeScript will generate source maps files (. One of the properties of the tsconfig.json file comes to our aid: The converted code loses its readability and it would be difficult to check it for errors, so I bet you prefer to check the Typescript code. Here the situation changes because the code is written in TypeScript which is converted to JavaScript. The API from the first part of the series was written in JavaScript, so when you launched the debugger, you went through the code we wrote. The API aims to provide a simple CRUD to handle books and save them in the database. Wondering what the reflect-metadata library does in this file? You’ll need it for the correct operation of decorators used in models with TypeORM. All used libraries can be found in the package.json file. My project is a simple API written in TypeScript using the Express.js framework with the Postgres database using TypeORM.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |