Skip to content

Ishwarya-Selvaraj/cruddyString

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cruddyString

example workflow example workflow

CRUD thing were you can put strings up.

Usage: cruddyString (inifile) (preload)

API

CruddyString (CS) hosts an HTTP server on port 8080

CRUD

Create

To create post data to the root directory '/'. The input field is 'inputdata' set that to whatever you want to upload. CS will return a number which corresponds to the index of the resource you uploaded.

Read

To read data send a get request to the directory '/i', where i corresponds to the index of the resource. CS will return the resource if it exists or if it does not exist it will return 400 Bad Request.

Update

Send a PATCH request to the directory '/i' where i is the index of the resource you wish to update. The input field is 'inputdata', same as Create. Update will respond with the old data before the rewrite.

Delete

Send a DELETE request tot the directory '/i' where i is the index of the resource you wish to update. Delete will respond with the old data that was deleted.

Ini file

An ini file can be optionally used.

[memory]
maxresourcesize=x
maxnumresources=y

Replace x with the max resource size and y with the max number of resources

Put the path to the ini file in the first argument.

Preload

You can preload resources to CS with a text file. Supply the path to this text file in the second argument.

Note: You must use an ini file if you wish to preload.

CS will read the file line by line adding each line as a resource.

About

CRUD thing were you can put strings up!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%