Skip to content

Commit

Permalink
Merge pull request #85 from talyssonoc/release-v3
Browse files Browse the repository at this point in the history
Release v3
  • Loading branch information
brunohcastro authored Sep 30, 2021
2 parents 3ae4415 + ce9164d commit f8f2f41
Show file tree
Hide file tree
Showing 180 changed files with 7,396 additions and 5,987 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

Empty file removed .env
Empty file.
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DB_NAME=blog_test
18 changes: 0 additions & 18 deletions .eslintrc

This file was deleted.

19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
"plugins": ["node", "jest", "prettier", "@typescript-eslint"],
"parserOptions": {
"ecmaVersion": 11
},
"rules": {
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/no-explicit-any": 0,
"max-len": [
"error",
{
"code": 120
}
]
}
}
28 changes: 5 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
# Logs
*.log

# Node
node_modules/

# Project specific
config/database.js

# Unit test / coverage reports
coverage/
.nyc_output

# OS auto-generated files
.DS_Store
._*


# Vim
*~
*.swp
*.swo

# IDE files
dist/
.index/
*.log
.idea/
.vscode/
coverage/
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

13 changes: 0 additions & 13 deletions .nycrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"arrowParens": "always",
"printWidth": 120,
"semi": true,
"singleQuote": true
}
8 changes: 0 additions & 8 deletions .sequelizerc

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2018 Talysson de Oliveira Cassiano
Copyright (c) 2021 Talysson de Oliveira Cassiano, Bruno Henrique de Castro

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

269 changes: 155 additions & 114 deletions README.md

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions bin/replClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { connect } from 'net';

const main = () => {
const { argv } = process;

let host = '127.0.0.1';
let port = 2580;

if (argv.length === 4) {
host = argv[2];
port = Number(argv[3]);
} else if (argv.length === 3) {
port = Number(argv[2]);
} else {
throw new Error('The command is supposed to be used as: yarn remote [server address] [REPL port]');
}

const sock = connect(port, host);

process.stdin.pipe(sock);
sock.pipe(process.stdout);

sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true);
});

sock.on('close', function done() {
process.stdin.setRawMode(false);
process.stdin.pause();
sock.removeListener('close', done);
});

process.stdin.on('end', function () {
sock.destroy();
console.log();
});
};

main();
35 changes: 0 additions & 35 deletions cluster.js

This file was deleted.

18 changes: 0 additions & 18 deletions config/database.js.example

This file was deleted.

14 changes: 0 additions & 14 deletions config/environments/development.js

This file was deleted.

10 changes: 0 additions & 10 deletions config/environments/production.js

This file was deleted.

3 changes: 0 additions & 3 deletions config/environments/test.js

This file was deleted.

27 changes: 0 additions & 27 deletions config/index.js

This file was deleted.

11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "3.5"

services:
mongodb:
container_name: blog-mongodb
image: mongo:4.2
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: blog
MONGO_INITDB_ROOT_PASSWORD: blog
27 changes: 27 additions & 0 deletions example_requests.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# @name article
POST http://localhost:3000/api/articles
Content-Type: application/json

{
"title": "This is my first article",
"content": "Test article content"
}

###
GET http://localhost:3000/api/articles

###
@articleId = {{article.response.body.$.id}}

POST http://localhost:3000/api/articles/{{articleId}}/comments
Content-Type: application/json

{
"body": "Nice!"
}

###

@articleId = {{article.response.body.$.id}}

PATCH http://localhost:3000/api/articles/{{articleId}}/publish
10 changes: 0 additions & 10 deletions index.js

This file was deleted.

Empty file removed logs/.gitkeep
Empty file.
Loading

0 comments on commit f8f2f41

Please sign in to comment.