Node.js is a versatile, open-source, cross-platform JavaScript runtime environment. This project is an Express.js application configured with ESLint and Prettier for code linting and formatting
Linters: ESLint and Prettier.
The app has the following structure:
controller
, middleware
, routes
and database
controller
: Manages application logic and handles user requests.middleware
: Acts as intermediaries for request and response processing.routes
: Define endpoints and map them to controller functions.database
: Manages persistent data storage and retrieval using Postgres.
- The blog Application was created using ExpressJs with Node.
- Implemented server creation, database connection, controllers, routes, and middleware for error handling.
- Added ESLint and Prettier for code linting.
- App perform like below step,
- Create server
- The application creates an Express.js server.
- Conncetion with db
- Established a connection with the database located in the db/ directory.
- controller
- Implemented controllers for handling different aspects of the application logic.
- Routes
- Defined routes for the application.
- Routes are implemented, and an index file manages the overall routing structure.
- Middleware
- Error Handling
- Middleware is configured to handle errors in the application.
- Create server
- Setup ESLint for Code standardization.
- Setup Prettier for Code format.
- WriteTechnical documentation on README.md file for better understading.
- Setup ESLint for Code standardization.
- Setup Prettier for Code format.
To set up the codebase and the required dependencies, simply run the following command.
$ npm i
for database refer to this file 'mapboxBackup'
# development
$ npm run start
# production
$ npm run build && npm run start