Greetings!
I need to upload file from computer to server (something like upload file 'test.txt' in '$amber_path/projects/myProject/files'). Does anybody knows how i can do this?
|
I am experimenting right now myself but if I understood you correctly, the server needs to respond to a put request. The server that is provided with amber does just that. Check amber/server/. The server has a method that
saves data to files. It is used to commit your changes when you develop your code. What I do to develop the server side of the code is load it to the browser, use the browser environment to work with the code and after I finish, i use amberc to create a js that can be used by nodejs.
So, if you want to see the server code, just create a js and st folder and put an index.html on the server folder. 2012/6/19 XumuK [via Smalltalk] <[hidden email]> Greetings! Sincerely yours, Apostolis Xekoukoulotakis |
In reply to this post by XumuK
XumuK <[hidden email]> writes:
Hi! What are you using on the server-side? Cheers, Nico > Greetings! > > I need to upload file from computer to server (something like upload > file 'test.txt' in '$amber_path/projects/myProject/files'). > Does anybody knows how i can do this? -- Nicolas Petton http://nicolas-petton.fr |
In reply to this post by XumuK
I run my amber server by following command: (in amber dir) sudo node ./server/server.js
|
In reply to this post by XumuK
If I understood you correctly, the server needs to respond to a put request. The server that is provided with amber does just that. Check amber/server/. The server has a method that saves data to files. It is used to commit your changes when you develop your code. What
I do to develop the server side of the code is load it to the browser,
use the browser environment to work with the code and after I finish, i
use amberc to create a js that can be used by nodejs.
So, if you want to see the server code, just create a js and st folder and put an index.html on the server folder. On Tuesday, June 19, 2012 10:20:10 PM UTC+3, XumuK wrote: Greetings! |
So, if i need to use functions declared in server.js, can i copy it to my project directory, for example 'myProhect/lib' and then use it from there?
среда, 20 июня 2012 г., 12:40:44 UTC+4 пользователь Apostolis Xekoukoulotakis написал:
|
If you are developing the client code, you simply use the server that already exists. ie you do nothing more that execute /bin/server.
2012/6/20 XumuK <[hidden email]> So, if i need to use functions declared in server.js, can i copy it to my project directory, for example 'myProhect/lib' and then use it from there? Sincerely yours, Apostolis Xekoukoulotakis |
Free forum by Nabble | Edit this page |