A Transform for this project to Typescript
See original GitHub issueHi, @Acconut , i explore all the internet and i fined this project Tus , i see this project are years of disrepair , but i need use nodejs as server and js/ts as client. so i create a copy of this project and try to translate all of it into Typescript.
you can have a look on this: https://github.com/Lyoko-Jeremie/tus-node-server
the transform are doing in progress. the main code base are done but the Test case dont. (because i unfamiliar about how to Test it, i need some times to learn many thing about it. Now i manual test it with tus-js-client use FileStorage on this project https://github.com/Lyoko-Jeremie/TestTus .)
i add the EVENT_CHUNK_UPLOADED event and MongoDB GridFS Backend to it because i need use the tus on a real project and i need a way to monitor all the progress and my project backend is Mongodb GFS.
the tslint not setup temporarily but i will add it soon.
the PR about #64 are done by my PipListener
, now it work for FileStorage but i will add it to other storage if i can .(the MongoGridFSStore will be add first if i test it work well.)
i writen a Reliable File Block Transport Protocol base Websocket for my real project at last two month, it with file hash verify like the Bittorrent to ensure the file complete AND some access control struct when connect setup to avoid server local disk fullfill attack And work with redis to keep distributied file lock work well. when i turn to my Protocol after a holiday, i suddenly discovered that my protocal is so complex. so i want to base on tus protocal and add some feature to this nodejs server implement ( example a plugin framework or something similar ) to make it can work on my real project.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
now you can try this: https://github.com/Lyoko-Jeremie/tus-node-server
i think this is stable, and it can be published to npm. only to follow or run the
generate.bat
file to compile the TS into js, and then publish it to npm.i will publish it a few day later.
Sorry i don’t think that. Use ts can make more help when dev and the user don’t need to care about it after ts compiled into a js lib.
After a typescript lib compile, it generate the .js file and .d.ts file. previous js user don’t need to care about the .d.ts file , they can direct use the .js file like before . And in the same time, the user’s IDE will auto read the .d.ts file to make intellisense and some tips in the back, example vscode or webstrom.