Code diplay online, it uses CodeMirror to the editor.
$ git clone https://github.com/Aztic/Rei && cd Rei
$ npm install
$ vim /routes/index.js #replace the BASE_URL const
$ npm start
You can either go to localhost:3000
(or your configured url) or use it with cURL like
curl -F "code=@your_file.extension" url
For example:
$ curl -F "code=test.cpp" http://localhost:3000/
that will return the url of the file, something like
https://le_url/random_name.cpp
You can also see the content of the file using cUrl.
$ curl http://localhost:3000/file.cpp
will return the content of the file, for example
$ curl http://localhost:3000/file.cpp
$ #include <iostream>
int main(){
return 0;
}
$ something_else
Apache 2.0