Developed the project in Node.js with Fastify and Knex, where routes for transactions and sessions were created.
Rules:
-
Functional Requirements:
- The user must be able to create a new transaction.
- The user must be able to get an account summary.
- The user must be able to list all transactions that have occurred.
- The user must be able to view a single transaction.
-
Business Rules:
- The transaction can be of type credit, which will add to the total value, or debit, which will subtract.
- It should be possible to identify the user between requests.
- The user can only view transactions that they have created.
- π§ Table of contents
- π Learning and more Implementations
- π‘ Technologies Used
- π Folder Structure
- π Running the Project
- π Routes
- π License
- β Author
- Learned to use Fastify and Knex.
- Learned to create migrations with Knex.
- Learned to create tests with Vitest.
- Learned to build the project and publish it.
Back-end
.
βββ db # Contains Migrations Knex and DB.
βββ src # Source files
β βββ @types # Contains all global definitions of types and interfaces
β βββ env # Contains configuration use env
β βββ middlewares
β βββ routes
β βββ server # Aplication entry
.
.
βββ test # Contains Test the route
.
.
βββ README.md
Clone the project
git clone https://github.com/VagnerNerves/api-rest-with-nodejs-ignitenode.git
Enter the project directory
cd api-rest-with-nodejs-ignitenode
Install with dependencies
npm install
Create the .env and .env.test files according to the examples in the folder.
Run the Knex migrations to create the database.
npm run knex migrate:latest
Start the server
npm run dev
This project is under the MIT license. See the LICENSE file for more details.
Made with love and hate π , get in touch!