Giter VIP home page Giter VIP logo

deno_api's Introduction

API RestFull desarrollada en Deno

Requisitos

  • Deno
VERSIÓN ACTUAL

PS C:\Users\Jesus> deno --version
deno 1.26.2 (release, x86_64-pc-windows-msvc)
v8 10.7.193.16
typescript 4.8.3
PS C:\Users\Jesus>
  • Deno plugin en VS Studio Code
Deno
v3.14.0
denoland 299,011
A language server client for Deno.
  • MongDB & MariaDB
  • Alguna herramienta para probar APIS como:
    • RapidAPI Puedes instalar la extension en Visual Studio Code.
    • PostMan
    • U otra

Instalacion del servidor

Puedes clonar en una carpeta en especifico utilizando PowerShell o Git.

mkdir NOMBRE_DIRECTORIO 
git clone https://github.com/asyncr/deno_api NOMBRE_DIRECTORIO 

O directamente.

git clone https://github.com/asyncr/deno_api

Configuración del servidor

Revisa que los datos del archivo connectors.ts correspondan a tus bases de datos.

/config/connectors.ts

Ejecucion del servidor

Es necesario recompilar todos los modulos para que se descarguen nuevamente.

deno cache --reload .\dependences.ts

Es posible que marque error debido a que denodb incorpora en sus modulos la librería std la cuál esta deprecada a partir de la version 0.161.0

Por lo que se debe forzar a instalarse.

deno install --allow-write -f --allow-read --unstable --allow-net .\dependences.ts

Y por ultimo correr el servidor.

deno run --allow-net --allow-write --allow-read --allow-env .\server.ts

Result

PS C:\Users\Jesus\Desktop\denoland> ls


    Directorio: C:\Users\Jesus\Desktop\denoland


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----    05/11/2022  01:27 a. m.                  .vscode
d-----    05/11/2022  01:27 a. m.                  config
d-----    05/11/2022  01:27 a. m.                  controllers
d-----    05/11/2022  01:27 a. m.                  interfaces
d-----    05/11/2022  01:27 a. m.                  middleware
d-----    05/11/2022  01:27 a. m.                  repositories
d-----    05/11/2022  01:27 a. m.                  routes
d-----    05/11/2022  01:27 a. m.                  services
-a----    05/11/2022  01:50 a. m.           1062   dependences.ts
-a----    05/11/2022  01:41 a. m.           1598   README.md
-a----    05/11/2022  01:27 a. m.            764   server.ts


PS C:\Users\Jesus\Desktop\denoland> deno cache --reload .\dependences.ts

Download ⠼ https://deno.land/[email protected]/crypto/util.ts                                                                                             Warning Implicitly using latest version (v3.2.0) for https://deno.land/x/dotenv/mod.ts
Download ⠼ https://deno.land/x/[email protected]/mod.ts                                                                                                 Warning Implicitly using latest version (v11.1.0) for https://deno.land/x/oak/mod.ts
Download ⠼ https://deno.land/x/[email protected]/mod.ts                                                                                                   Warning Implicitly using latest version (v1.1.0) for https://deno.land/x/denodb/mod.ts
Download ⠼ https://deno.land/x/[email protected]/mod.ts                                                                                                 Warning Implicitly using latest version (v2.7) for https://deno.land/x/djwt/mod.ts
Download ⠼ https://deno.land/[email protected]/crypto/_wasm_crypto/lib/deno_std_wasm_crypto.generated.mjs                                                 Warning Implicitly using latest version (v0.2.10) for https://deno.land/x/expect/mod.ts
Download ⠼ https://deno.land/x/[email protected]/mod.ts                                                                                                Warning Implicitly using latest version (0.162.0) for https://deno.land/std/http/http_status.ts
Download ⠦ https://deno.land/x/[email protected]/connection/message.ts                                                                               Warning Implicitly using latest version (0.162.0) for https://deno.land/std/fmt/colors.ts
Download ⠧ https://deno.land/[email protected]/fmt/colors.ts                                                                                              Warning Implicitly using latest version (0.162.0) for https://deno.land/std/node/assert.ts
Warning Implicitly using latest version (0.162.0) for https://deno.land/std/node/events.ts
Warning Implicitly using latest version (0.162.0) for https://deno.land/std/node/stream.ts
Warning Implicitly using latest version (0.162.0) for https://deno.land/std/node/url.ts
Download ⠧ https://deno.land/[email protected]/node/url.ts                                                                                                Warning Implicitly using latest version (0.162.0) for https://deno.land/std/node/util.ts
Warning Implicitly using latest version (0.162.0) for https://deno.land/std/path/mod.ts
Warning Implicitly using latest version (0.162.0) for https://deno.land/std/uuid/mod.ts

PS C:\Users\Jesus\Desktop\denoland> deno install --allow-write -f --allow-read --unstable --allow-net .\dependences.ts
✅ Successfully installed dependences
C:\Users\Jesus\.deno\bin\dependences.cmd
C:\Users\Jesus\.deno\bin\dependences (shell)

PS C:\Users\Jesus\Desktop\denoland> deno run --allow-net --allow-write --allow-read --allow-env .\server.ts
Server running on port 8080

deno_api's People

Contributors

asyncr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.