3.0.0-alpha.2 • Published 3 years ago

treasy v3.0.0-alpha.2

Weekly downloads
14
License
ISC
Repository
-
Last release
3 years ago

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 the HTML folder (without the basic html) add the file.js to the Public/Codes/JS folder and when all your code is in a load function add the file.css to the Public/Codes/CSS folder (.js and .css files are not mandatory) add file to Data/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.0.0-alpha.1

3 years ago

3.0.0-alpha.0

3 years ago

3.0.0-alpha.2

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

0.2.0

4 years ago

0.1.0

4 years ago

1.0.8

4 years ago

1.0.2

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago