diff --git a/README.md b/README.md index 103dd2f..64111e6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Resize-Api -The resize API allow to place images into your frontend with the size set via URL parameters for rapid prototyping +The resize API allow to place images into your frontend with the size set via URL parameters for rapid prototyping. -A library to serve properly scaled versions of your images to the front end to reduce page load size +A library to serve properly scaled versions of your images to the front end to reduce page load size. + +Rather than needing to resize and upload multiple copies of the same image to be used throughout your site, the API handle resizing and serving stored images. # Installation @@ -19,7 +21,8 @@ A library to serve properly scaled versions of your images to the front end to r You can also run the code through the nodemon devepement server `npm run start` -When the server is running, you can resize an image by going to this url and adding parameters to resize the image `http://localhost:5000/api/image?filename=encenadaport&width=200&height=200` +When the server is running, you can resize an image availible in the `images/full` folder by going to this url and adding parameters to resize the image +`http://localhost:5000/api/image?filename=encenadaport&width=200&height=200` # Built with diff --git a/src/index.ts b/src/index.ts index 41bf9cf..8df87af 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,15 +4,10 @@ import routes from './routes/index' const app = express(); const port = 3000; - -// app.get('/api', (req, res) => { -// res.send('welcome to api'); -// }) - +// get routes app.use('/api', routes) // start Express server - app.listen(port, () => { console.log(`server started at http://localhost:${port}`); })