This API can be used as a placeholder that allows you to resize an image's width and height based on url parameters.
Project Structure.
images
resizzedImages
spec
support
jasmine.json
src
functionality
resizeFunc.ts
routes
api
resizingRoute.ts
router.ts
tests
helpers
reporter.ts
homeRouteSpec.ts
resizingRouteSpec.ts
app.ts
node_modules
.eslintrc.js
.prettierignore
.prettierrrc
package-lock.json
pachage.json
tsconfig.json
LICENSE.txt
README.md
-
Install all dependencies
npm install
-
Build the project from TypeScript to JavaScript
npm run build
-
Start the Server
npm start
The server will start on port: 3000, and the default host is on: http://localhost:3000.
-
Run the Tests
npm run test
-
Run Prettier and ESLint
npm run prettier
npm run lint
-
Homepage Endpoint
http://localhost:3000/home-page
-
Resizing Endpoint
/api/image/resize?name={image-name}width=<image-width>&height=<image-height>
-
API main Endpoint
/api