You can visit live demo here https://file-system-service.onrender.com
Please note that after few minutes without receiving any request, the server will be shut down because of the free tier plan of Render. To start the server, just send new request with a few minutes delay (wakes server up).
npm installCreate .env file at root folder from .env.template file
- Please prepare a database with a name that you like. Ex: interviewdb
- PostgreSQL version: 14x
# Build the source code first
npm run build
# Run migration up
npm run db:migration# development
npm run start
# watch mode
npm run start:dev
# production mode
npm run start:prod- Create new resource (cr command)
POST /v1/resources HTTP/1.1
Host: localhost:5000
Content-Type: application/json
Content-Length: 63
{
"path": "/",
"name": "file",
"data": "size"
}- Get file content (cat command)
GET /v1/resources/content?path=/file HTTP/1.1
Host: localhost:5000- List folder items (ls command)
GET /v1/resources/children?path=/ HTTP/1.1
Host: localhost:5000- Delete resource (rm command)
DELETE /v1/resources/multiple?pathList=["/root1","/file"] HTTP/1.1
Host: localhost:5000- Step 1: commit code
- Step 2: create pull request to master
- Author: Huy Le Minh
- Linkedin: huyleminh-dev