This repository contains a production-ready setup for an Express.js application with PostgreSQL and Sequelize ORM.
- Express.js server setup
- PostgreSQL database integration
- Sequelize ORM configuration
- Babel for ES6+ support
- Nodemon for development
- Environment-based database configuration
Before you begin, ensure you have met the following requirements:
- Node.js 16.x or higher
- npm 6.x or higher
- PostgreSQL installed locally
-
Clone the repository:
git clone https://github.com/leandreAlly/express-postgres-sequelize-setup
-
Navigate to the project directory:
cd express-postgres-sequelize-setup
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add your database configuration:DATABASE_URL=postgresql://<USER>:<PASSWORD>@localhost:5432/<DATABASENAME>
To start the development server:
npm run dev
The server will start on http://localhost:3000
(or the port specified in your environment variables).
express-app/
├── src/
│ ├── controllers/
│ ├── database/
│ │ ├── config/
│ │ ├── models/
│ │ ├── migrations/
│ │ └── seeders/
│ ├── routes/
│ ├── services/
│ ├── utils/
│ ├── app.js
│ └── server.js
├── .babelrc
├── .env
├── .gitignore
├── .sequelizerc
├── package.json
└── README.md
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
This project is MIT licensed.
LEANDRE ALLY
- Website: leandre-ally
- Twitter: @ally
- Github: @leandreally