siimpleorm
v2.4.0
Published
<h1 align="center"> <img src="assets/logo.png"> </h1> <p align="center"> <img alt="Version" src="https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white" /> <a href="#" target="_blank"> <img alt="License: MIT" src="h
Readme
An simple object relational mapper project.
Install
yarn add siimpleormor
npm install siimpleormor
pnpm install siimpleorm.env
SIMPLE_CLIENT="mysql"
SIMPLE_HOST="localhost"
SIMPLE_USER="root"
SIMPLE_PASSWORD=123456
SIMPLE_DATABASE="example"Example Entity
@Table('users')
export default class User extends Entity {
public id?: string;
public name: string;
public age: string;
}Example Controller
const controller = {
async index(request, response) {
try {
const row = await client.findAll();
return res.status(200).json(row);
} catch (error) {
return res.status(400).json(error.message);
}
},
};
export default controller;Author
👤 Daniel Murilo Vaz
- Website: https://www.daniellvaz.com.br
- Twitter: @daniellmurilo
- Github: @daniellvaz
- LinkedIn: @daniellvaz
🤝 Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator
