Skip to content

Commit

Permalink
adicionando README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
verissimon committed Nov 4, 2023
1 parent 6881b3e commit 17cb28f
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
# API-atividade1-pw1

Aplicação para gerenciar uma lista de tecnologias de estudos por usuário.
## Study Technologies Management API

This RESTful API is developed using Node.js, TypeScript, Express.js, Prisma, and SQLite. It allows users to manage a list of study technologies. Users can create an account with a name and username, and perform CRUD operations on technologies.

### 1. Prerequisites

Make sure you have Node.js and npm installed on your system. You also need to install the necessary packages using the following command:

```bash
npm install
```

### 2. Create and seed the database

Run the following command to create your SQLite database file. This also creates the `User` and `Technology` tables that are defined in [`prisma/schema.prisma`](./prisma/schema.prisma):

```bash
npx prisma migrate dev --name init
```

When `npx prisma migrate dev` is executed against a newly created database, seeding is also triggered. The seed file in [`prisma/seed.ts`](./prisma/seed.ts) will be executed and your database will be populated with the sample data.

### 3. Start the REST API server

```bash
npm run dev
```

The server is now running on `http://localhost:3001`. You can now run the API requests, e.g. [`http://localhost:3001/users`](http://localhost:3001/users).

0 comments on commit 17cb28f

Please sign in to comment.