Skip to content

API Rest Full based in Express using mysql lib that auto generate base code for simple crud (with unit tests and feature tests)

License

Notifications You must be signed in to change notification settings

not-empty/ana-microframework-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Nodejs Api

Latest Version PRs Welcome

API Rest Full based in Express using mysql lib that auto generate base code for simple crud (with unit tests and feature tests)

Requires NodeJs v18.13.0.

Requires Docker.

Installation

(optional) Stop all other containers to avoid conflict.

docker stop $(docker ps -qa)

Create .env file

cp .env.example .env

Generate a new key and put in JWT_APP_SECRET env value

JWT_APP_SECRET=secret_value_here

Start project with Docker using Composer tool.

docker-compose up --build -d

Using Postman to consulting the routes created and put the new routes.

ana-microservice.postman_collection.json
ana-microservice.postman_environment.json

Or you can access Here in port 3000.

Recomendations

Use this project with MySql with no relationship keys and NOT use JOIN.

In this way you can use all database maturity with as fast as possible.

Use Clear Linux image in your NodeJs container to get more 50% speed and 50% less memory.

Production

The production docker is located in docker/prod and you can change if you want.

Development

Want to contribute? Great!

The project using a simple code. Make a change in your file and be careful with your updates! Any new code will only be accepted with all viladations.

Using docker dev image to run all validations

docker exec ana-microservice-nodejs npm run lint
docker exec ana-microservice-nodejs npm run test

If you want test coverage

docker exec ana-microservice-nodejs npm run test:cover

Or if you need to run all validations together

docker exec ana-microservice-nodejs npm run checkallcover

Not Empty Foundation - Free codes, full minds

About

API Rest Full based in Express using mysql lib that auto generate base code for simple crud (with unit tests and feature tests)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •  

Languages