Skip to content

bruno-elvis/sequelize-crud-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SEQUELIZE-CRUD-POSTGRESQL

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

EditorConfig JavaScript D Nodemon Sequelize Heroku SemVer
Lodash Yarn Buffer HERE JSON Express


πŸ”— Quick Links


πŸ“‚ Repository Structure

└── sequelize-crud-postgresql/
    β”œβ”€β”€ LICENSE
    β”œβ”€β”€ README.md
    β”œβ”€β”€ package.json
    β”œβ”€β”€ src
    β”‚   β”œβ”€β”€ config
    β”‚   β”‚   └── database.js
    β”‚   β”œβ”€β”€ controllers
    β”‚   β”‚   β”œβ”€β”€ AddressController.js
    β”‚   β”‚   β”œβ”€β”€ DownloadController.js
    β”‚   β”‚   β”œβ”€β”€ ReportController.js
    β”‚   β”‚   β”œβ”€β”€ UserController.js
    β”‚   β”‚   └── VehiclesController.js
    β”‚   β”œβ”€β”€ database
    β”‚   β”‚   β”œβ”€β”€ index.js
    β”‚   β”‚   └── migrations
    β”‚   β”‚       β”œβ”€β”€ 20220923032520-create-users-teste.js
    β”‚   β”‚       β”œβ”€β”€ 20220924233055-create-count-downs.js
    β”‚   β”‚       β”œβ”€β”€ 20220925000739-create-addresses.js
    β”‚   β”‚       β”œβ”€β”€ 20221002224200-create-vehicles.js
    β”‚   β”‚       └── 20221002224821-create-user_vehicle.js
    β”‚   β”œβ”€β”€ models
    β”‚   β”‚   β”œβ”€β”€ Address.js
    β”‚   β”‚   β”œβ”€β”€ Downloads.js
    β”‚   β”‚   β”œβ”€β”€ Users.js
    β”‚   β”‚   └── Vehicles.js
    β”‚   β”œβ”€β”€ routes.js
    β”‚   └── server.js
    └── yarn.lock

🧩 Modules

.
File Summary
package.json package.json
yarn.lock yarn.lock
src
File Summary
server.js src/server.js
routes.js src/routes.js
src.database
File Summary
index.js src/database/index.js
src.database.migrations
File Summary
20221002224821-create-user_vehicle.js src/database/migrations/20221002224821-create-user_vehicle.js
20220923032520-create-users-teste.js src/database/migrations/20220923032520-create-users-teste.js
20221002224200-create-vehicles.js src/database/migrations/20221002224200-create-vehicles.js
20220925000739-create-addresses.js src/database/migrations/20220925000739-create-addresses.js
20220924233055-create-count-downs.js src/database/migrations/20220924233055-create-count-downs.js
src.models
File Summary
Users.js src/models/Users.js
Downloads.js src/models/Downloads.js
Address.js src/models/Address.js
Vehicles.js src/models/Vehicles.js
src.config
File Summary
database.js src/config/database.js
src.controllers
File Summary
AddressController.js src/controllers/AddressController.js
VehiclesController.js src/controllers/VehiclesController.js
ReportController.js src/controllers/ReportController.js
UserController.js src/controllers/UserController.js
DownloadController.js src/controllers/DownloadController.js

πŸš€ Getting Started

Requirements

Ensure you have the following dependencies installed on your system:

  • JavaScript: version x.y.z

βš™οΈ Installation

  1. Clone the sequelize-crud-postgresql repository:
git clone https://github.com/Bruno-Elvis/sequelize-crud-postgresql
  1. Change to the project directory:
cd sequelize-crud-postgresql
  1. Install the dependencies:
npm install

πŸ€– Running sequelize-crud-postgresql

Use the following command to run sequelize-crud-postgresql:

node app.js

πŸ§ͺ Tests

To execute tests, run:

npm test

🀝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone https://github.com/Bruno-Elvis/sequelize-crud-postgresql
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.


πŸ“„ License

This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.


Esta API estΓ‘ integrada ao PostgreSQL em nuvem, disponivel na plataforma ElephantSQL ( https://www.elephantsql.com/ );

Para definiΓ§Γ£o das entidades no banco foi utilizado Migrations junto ao Sequelize.

API rodando em ambiente Heroku ( https://www.heroku.com ), possui os endpoints:

// Users https://sequelize-crud-postgresql.herokuapp.com/users (GET e POST)

// Adresses https://sequelize-crud-postgresql.herokuapp.com/users/:user_id/addresses (GET e POST)

// Vehicles https://sequelize-crud-postgresql.herokuapp.com/users/:user_id/vehicles (GET, POST e DELETE)

// Downloads https://sequelize-crud-postgresql.herokuapp.com/downloads (GET) https://sequelize-crud-postgresql.herokuapp.com/counts (GET)

Releases

No releases published

Packages

 
 
 

Contributors