Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isaacalves7/back-end
π·πΎ It's a repository of Back-end development and design.
https://github.com/isaacalves7/back-end
api back-end backend client-server-architecture cluster crud dockerization graphql grpc mvc odm orm polling restful-api rpc soap webservice websockets
Last synced: 28 days ago
JSON representation
π·πΎ It's a repository of Back-end development and design.
- Host: GitHub
- URL: https://github.com/isaacalves7/back-end
- Owner: IsaacAlves7
- Created: 2022-09-07T16:06:56.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T11:47:02.000Z (2 months ago)
- Last Synced: 2024-10-25T09:52:06.228Z (2 months ago)
- Topics: api, back-end, backend, client-server-architecture, cluster, crud, dockerization, graphql, grpc, mvc, odm, orm, polling, restful-api, rpc, soap, webservice, websockets
- Language: JavaScript
- Homepage: http://localhost:3000/posts
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Back-end
[![docker-compose.yaml](https://img.shields.io/badge/-docker--compose.yaml-pink?style=social&logo=docker&logoColor=magenta)](#)
```yaml
version: "3"
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: rest-api-4
environment:
- DB_USER=postgres
- DB_PASSWORD=Postgres2019!
- DB_HOST=postgres
- DB_PORT=5432
- DN_NAME=blog
ports:
- 3000:3000
volumes:
- ./:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- postgres
networks:
- rest-api-4-network
postgres:
image: postgres:11
restart: unless-stopped
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "Postgres2019!"
POSTGRES_DB: "blog"
ports:
- 15432:5432
volumes:
- postgres-data:/data
networks:
- rest-api-4-networkpgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ""
PGADMIN_DEFAULT_PASSWORD: ""
ports:
- "16543:80"
depends_on:
- postgres
networks:
- rest-api-4-networkvolumes:
postgres-data:networks:
rest-api-4-network:
driver: bridge
```[![dockerfile](https://img.shields.io/badge/-Dockerfile-blue?style=social&logo=docker&logoColor=blue)](#)
```dockerfile
FROM node:14# Create app directory
WORKDIR /usr/src/app# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./RUN npm install
# If you are building your code for production
# RUN npm ci --only=production# Bundle app source
COPY . .EXPOSE 3000
CMD [ "node", "server/server.js" ]
```# π Deploy in AWS - Amazon Web Services
### Inside Amazon EC2 instance (public instance)
```sh
psql -h [endpoint rds] -u [usuΓ‘rio] -w postgres
```### Inside Database
```sql
INSERT TO blog.post VALUES(7,'Isaac','DevOps Engineer', '2021-11-01 23:54:02');
SELECT * FROM blog.post;
```### SSM
```
!Sub '{{resolve:ssm-secure:/ECSCluster/${ClusterName}/RDS_ROOT_PASSWORD:1}}'
```