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-project
When 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 init
To run your server just do :
run
To add files :
If you want to add an url that nedds an auth add the
file.html
to theHTML
folder (without the basic html) add thefile.js
to thePublic/Codes/JS
folder and when all your code is in a load function add thefile.css
to thePublic/Codes/CSS
folder (.js and .css files are not mandatory) addfile
toData/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
.
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago