Tutorial:create Api Download and Upload using Loopback IBM

For this tutorial we gonna use a previous tutorial that you can access here.

The first step is to create two Typescript files named keys.ts and keys.ts, with the following code:

For the keys.ts file:

For the types.ts file:

Now open nodejs prompt, change the directory for the project and type:

npm install — save-dev @types/multer

The next step is to create our Download controller, name it as file-download.controller.ts

The next step is to create our Upload controller, name it as file-upload.controller.ts

Now type the following command to get our server up:

npm start

Then open your browser and go to http://[::1]:3000

And the output should look like this: