TypeScript Persistent API (TSPA)
TypeScript Persistent API (TSPA) is a simple, lightweight, and easy-to-use library for creating and managing persistent data in a TypeScript application.
It provides a simple API for creating, reading, updating, and deleting data in a various data store such as LocalStorage, Firestore, and MongoDB (more to come).
Install
yarn install @anietieasuquo/tspa
Usage
.env
MONGO_URI=mongodb://localhost:27017/mydb
import { Entity, MongoCrudRepository } from '@anietieasuquo/tspa';
interface User extends Entity {
name: string;
email: string;
}
const user: User = {
id: '1',
name: 'John Doe',
email: 'johndoe@email.com'
}
const userRepository = new MongoCrudRepository<User>();
userRepository.create(user);
Author
👤 Anietie Asuquo hello@anietieasuquo.com
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
📝 License
Copyright © 2024 Anietie Asuquo hello@anietieasuquo.com.
This project is MIT licensed.