treasy v3.0.0-alpha.2
You can start a project really simple with this by doing this :
npm i treasy --global #(ou -g)And then, in the folder you want :
start-projectWhen it'll be finished, you can change the Data/params.js file like that (you can dont't do this is you want):
module.exports = {
encode : data => encodedData,
decode : data => decodedData,
//note that decode(encode(str)) === str
encrypt : password => encryptedPassword,
//it mustn't use random because it must always be the same with a same password and be the most secure possible
port : 8080, //the port where will be your server
User,
errors : {
creditentials : 'Wrong creditentials.', //the error when username and password doesn't match
accountAlready : 'Account already exists' //the error when user try to create an account but the username is already taken
},
connection : 'I\'m connected !'
//the message displayed in the console when the server is launched
}To make your server work, just do a simple :
npm initTo run your server just do :
runTo add files :
If you want to add an url that nedds an auth add the
file.htmlto theHTMLfolder (without the basic html) add thefile.jsto thePublic/Codes/JSfolder and when all your code is in a load function add thefile.cssto thePublic/Codes/CSSfolder (.js and .css files are not mandatory) addfiletoData/url.json(and of course, file is your filename)Else, if your want a public url Do how you want !
All connections are reported in the Data/connection.txt with their time of connection and their ip, and the errors with their two firsts lines (and in the console too) and all the errors are all reported in the Data/errors.txt.
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago