Skip to content
This repository has been archived by the owner on Jul 8, 2021. It is now read-only.

schoolseat/old-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API SchoolsSeat

🇺🇸 - This project is a simple api that uses ExpressJS, KnexJS and SQLite.

Install and run

In the project directory, you may run:

To install all dependencies.

yarn install

The migration and create sqlite file.

yarn knex migrate:latest

The app in the development mode.

yarn start

Open http://localhost:3333 to view it in your browser.

You may use postman or insomnia

Useful exemples

URL Method Info
/api/users POST Create an user.
/api/users GET Show all users.
/api/users/:id GET Show user by id.
/api/users/:id DELETE Delete user by id.
/api/users/:id PATCH Update user by id.

TODO:

  • Create routes for delete and update user.
  • Create router for lessons.
  • Make it 100% functional.

🇧🇷 - Esse projeto é uma Api que usa ExpressJS, KnexJS e SQLite.

Instalação e execução

No diretorio do projeto você pode:

Para instalar as dependencias execute:

yarn install

Para a migração e criação do SQLite execute:

yarn knex migrate:latest

E por ultimo você pode ligar a Api por meio do comando:

yarn start

Abra http://localhost:3333 no seu navegador para visualizar a API.

Você pode usar postman ou insomnia.

Exemplos de uso.

URL Method Info
/api/users POST Cria um usuario.
/api/users GET Mostra os usuarios.
/api/users/:id GET Mostra um usuario pelo id.
/api/users/:id DELETE Deleta um usuario pelo id.
/api/users/:id PATCH Atualiza um usuario pelo id.

TODO:

  • Criar rotas para excluir e atualizar o usuário.
  • Criar rota para aulas.
  • Deixar 100% funcional.

License

MIT

Releases

No releases published

Packages

No packages published