https://github.com/64j0/twitter-sequelize-typescript
A project to study about sequelize with typescript creating a simple twitter backend clone.
https://github.com/64j0/twitter-sequelize-typescript
Last synced: about 2 months ago
JSON representation
A project to study about sequelize with typescript creating a simple twitter backend clone.
- Host: GitHub
- URL: https://github.com/64j0/twitter-sequelize-typescript
- Owner: 64J0
- Created: 2021-04-14T02:28:10.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-21T00:35:31.000Z (almost 4 years ago)
- Last Synced: 2025-02-24T01:42:21.659Z (2 months ago)
- Language: TypeScript
- Size: 144 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Twitter clone back-end
This project will be a simplified twitter back-end clone implemented with Postgres as the database option. The main goal is to study more concepts of SQL with sequelize as the ORM and typescript as the language.
* Postgres is running with Docker in my local machine, maybe later I'll make a dockerfile to automate the process of starting the project even with the database.
### Useful commands:
```bash
# DATABASE:
#
# Create migration file:
npx sequelize migration:create --name=# Apply the migrations automatically:
npx sequelize db:migrate# Revert last migration:
npx sequelize db:migrate:undo# ///////////////////////////
# SERVER:
#
# Build the application (transpile ts -> js):
npm run build# Start transpiled application:
npm start# Start application in dev environment:
npm run dev# ///////////////////////////
# DOCKER:
#
# Build the image locally:
docker build . -t /twitter-sql-ts# Run the image:
docker run -p 49160:8080 -d /twitter-sql-ts# Remove image:
docker rmi# Remove container:
docker rm
```### References:
[1] - https://www.hiredintech.com/classrooms/system-design/lesson/67
[2] - https://nodejs.org/en/docs/guides/nodejs-docker-webapp/ -> For Dockerfile
[3] - https://www.digitalocean.com/community/tutorials/como-construir-uma-aplicacao-node-js-com-o-docker-pt -> For Dockerfile
[4] - https://stackoverflow.com/questions/60014874/how-to-use-typescript-with-sequelize
---
2021, Vinícius Gajo Marques Oliveira