Coder Social home page Coder Social logo

glot-run's People

Contributors

javierprovecho avatar nishant95 avatar prasmussen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glot-run's Issues

glot-run permissions?

Hi

I installed everything and all works except running a code through glot-run API which throws 500 internal server error.

I have this error and I wonder if there aren't any security settings/permissions I need to check . My error is econnrefused....

I confirmed with curl docker api is enabled and running on 2375 and that I put the right IP/PORT in the env DOCKER_API_URL settings.

The container glot/python is installed and tested standalone.

Any idea? Thanks!!

22:09:16.410 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.639.0> exit with reason: {[{reason,{badmatch,{error,econnrefused}}},{mfa,{language_run_resource,accept_post,2}},{stacktrace,[{docker,container_create,1,[{file,"/glot-run/_build/default/lib/glot/src/docker/docker.erl"},{line,13}]},{language_run,run,3,[{file,"/glot-run/_build/default/lib/glot/src/models/language_run.erl"},{line,11}]},{language_run_resource,run_code,3,[{file,"/glot-run/_build/default/lib/glot/src/resources/language_run_resource.erl"},{line,97}]},{cowboy_rest,call,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,process_content_type,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,777}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.995>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.639.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{83,199,179,80},57446}},{host,<<"ec2-52-90-7-66.compute-1.amazonaws.com">>},{host_info,undefined},{port,80},{path,<<"/languages/python/latest">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"latest">>},{name,<<"python">>}]},{headers,[{<<"accept-encoding">>,<<"gzip,deflate">>},{<<"authorization">>,<<"Token mytoken">>},{<<"content-type">>,<<"application/json">>},{<<"content-length">>,<<"110">>},{<<"host">>,<<"ec2-1.amazonaws.com">>},{<<"connection">>,<<"Keep-Alive">>},{<<"user-agent">>,<<"Apache-HttpClient/4.1.1 (java 1.5)">>}]},{p_headers,[{<<"content-type">>,{<<"application">>,<<"json">>,[]}},{<<"if-modified-since">>,undefined},{<<"if-none-match">>,undefined},{<<"if-unmodified-since">>,undefined},{<<"if-match">>,undefined},{<<"accept">>,undefined},{<<"connection">>,[<<"keep-alive">>]}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,'*'}},{charset,undefined}]},{body_state,waiting},{buffer,<<"{\n \"language\": \"python\",\n \"files\": [{\n \"name\": \"main.py\",\n \"content\": \"print(\\\"Hello World!\\\")\"\n }]\n}">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]}]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,<<"python">>,<<"latest">>}}],[{cowboy_rest,process_content_type,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,777}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]}

This is the command I ran:

docker run \
  -it -p 80:80 \
  --detach \
  --restart always \
  --env API_ENVIRONMENT="development" \
  --env API_HTTP_LISTEN_IP="0.0.0.0" \
  --env API_HTTP_LISTEN_PORT="80" \
  --env DATA_PATH="/home/app/data/" \
  --env LOG_PATH="/home/app/log/" \
  --env BASE_URL="http://ec2-xxxxxxxx-1.amazonaws.com" \
  --env ADMIN_TOKEN="secret" \
  --env DOCKER_API_URL="http://127.0.0.1:2375" \
  --env DOCKER_RUN_TIMEOUT="15" \
  --env MAX_OUTPUT_SIZE="100000" \
  --volume /containers/glot-run/data:/home/app/data \
  --volume /containers/glot-run/log:/home/app/log \
  javierprovecho/glot-run

Wrong auth token

When i tried a this curl command 'curl -4 -sv -H "Authorization: Token some-secret" -H 'Content-type: application/json' -X POST -d '{"files": [{"name": "main.sh", "content": "echo "hello"\n"}]}' 54.152.33.106:8090/languages/bash/latest'
it reply 'Wrong auth token' message.
how to set auth token and where to set auth token??

@prasmussen @javierprovecho

Code exceeded the maximum allowed running time

The problem occurs when i POST a python sample to my local server

curl -X POST \
  http://127.0.0.1:9999/languages/python/latest \
  -H 'authorization: Token d11088bc-a29d-4d49-a633-b1b1ae807064' \
  -H 'content-type: application/json' \
  -d '{
  "language": "python",
  "files": [
    {
      "name": "main.py",
      "content": "print(42)"
    }
  ]
}'

I receive a 400 Bad request with a message :

{"message": "Code exceeded the maximum allowed running time"}

Additional informations about my environment:
Docker API :

$ curl http://127.0.0.1:2375/version
{"Version":"17.05.0-ce","ApiVersion":"1.29", etc ...

glot-run output :

19:59:11.166 [info] Application lager started on node '[email protected]'
19:59:11.166 [info] Application cowboy started on node '[email protected]'
19:59:11.166 [info] Application uuid started on node '[email protected]'
19:59:11.166 [info] Application ssl_verify_fun started on node '[email protected]'
19:59:11.166 [info] Application hackney started on node '[email protected]'
20:12:56.530 [warning] lager_error_logger_h dropped 64 messages in the last second that exceeded the limit of 50 messages/sec

glot-run script runner :

#!/bin/bash

export API_ENVIRONMENT="development" \
export API_HTTP_LISTEN_IP="0.0.0.0" \
export API_HTTP_LISTEN_PORT="9999" \
export DATA_PATH="/tmp" \
export LOG_PATH="/tmp" \
export BASE_URL="http://127.0.0.1" \
export ADMIN_TOKEN="secret" \
export DOCKER_API_URL="http://127.0.0.1:2375" \
export DOCKER_RUN_TIMEOUT="15" \
export MAX_OUTPUT_SIZE="100000" \

./glot foreground

I appreciate any support.

Benchmarking and scaling up

I have one instance of glot-run running. I did a benchmarking using 'Apache ab' with the following parameters:

  • Number of Request - 200
  • Concurrency - 10
  • Print "Hello World!" program in python

These are the results -

This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests

Server Software: Cowboy
Server Hostname: 127.0.0.1
Server Port: 8090

Document Path: /languages/python/latest
Document Length: 42 bytes

Concurrency Level: 10
Time taken for tests: 165.044 seconds
Complete requests: 200
Failed requests: 170
(Connect: 0, Receive: 0, Length: 170, Exceptions: 0)
Non-2xx responses: 170
Total transferred: 29120 bytes
Total body sent: 55800
HTML transferred: 1260 bytes
Requests per second: 1.21 [#/sec] (mean)
Time per request: 8252.200 [ms] (mean)
Time per request: 825.220 [ms] (mean, across all concurrent requests)
Transfer rate: 0.17 [Kbytes/sec] received
0.33 kb/s sent
0.50 kb/s total

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.6 0 7
Processing: 4140 8146 4262.4 5039 18715
Waiting: 4139 8145 4262.3 5038 18715
Total: 4141 8146 4262.4 5039 18716

Percentage of the requests served within a certain time (ms)
50% 5039
66% 9413
75% 11697
80% 12977
90% 15369
95% 16340
98% 17946
99% 18164
100% 18716 (longest request)

That shows a 15% success rate.
Planning to have a coding challenge for my college, and requests will be close to the above parameters. Been thinking about various approaches, one of them being where code run requests are pushed to Redis, while multiple glot-run nodes listen for requests, and process when available.
Confused about how to go about scaling this setup. Looking for suggestions. Thanks.

Quotation mark (or escape characters?) processing issue

The json file I sent (you can see the request here):

{"files": [{"name": "main.c", "content": '#include <stdio.h>

int main() {
    printf("Hello World!\n");
    return 0;
}'}]}

Got this in response:

{"stdout":"","stderr":"/tmp/812467442/main.c:4:12: warning: missing terminating '\"' character [-Winvalid-pp-token]\n    printf(\"Hello World!\n           ^\n/tmp/812467442/main.c:4:12: error: expected expression\n/tmp/812467442/main.c:5:1: warning: missing terminating '\"' character [-Winvalid-pp-token]\n\");\n^\n/tmp/812467442/main.c:7:2: error: expected '}'\n}\n ^\n/tmp/812467442/main.c:3:12: note: to match this '{'\nint main() {\n           ^\n2 warnings and 2 errors generated.\n","error":"exit status 1"}

If I delete the \n in printf("Hello World!\n");, it will compile successfully. I think it's something to do with string processing.


Thanks for creating glot BTW, it's a very cool project. I hope there will be an option to choose from different response formats, so I can get something like this without extra parsing:

$ glot.sh main.c
Hello World
$ glot.sh main.py
42

I've tried to set header to Content-type: text/plain, it returned nothing...

Docker daemon

Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at tcp://127.0.0.1:80. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at tcp://127.0.0.1:80. Is the docker daemon running?

CORS

I am using the glot-run API for a web app that executes user-written code in a Docker container. When I try to make a $https request to the API from my Angular factory, I get the following CORS preflight error:

"XMLHttpRequest cannot load https://run.glot.io/languages/javascript/latest. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:1337' is therefore not allowed access. The response had HTTP status code 405."

I see that code is included in the http_util file that seems to be written to handle this issue, but it does not seem to be allowing for the request I am trying to make to the API. @glebec

Missing or wrong access token

Any of my tokens from the official website is not valid. I always got the error access_token with message Missing or wrong access token.

Problems with Golang and C

Hello! I am working with the container made by @javierprovecho with the tag 1.2.1.

Testing the api, I have problems with Clang and Golang containers.

image

I get a 204 (no content) answer from the api, whereas using other containers (like Python one) I don't have any problems.

All the containers are with the "latest" tag and coming from the glot docker hub.

If it helps these are currently the images/languages available on my instance:

image

Any ideas what might be the reason of this?

Thanks in advance! This is a really great tool! πŸ˜πŸ‘πŸ»πŸ‘πŸ»πŸ‘πŸ»

Glot for Docker cloud?

Hello

Is glot compatible with Docker Cloud?
I managed to install it and to create a user & add a language. However when I want to run a piece of code it fails , I suspect because it cannot reach the Docker API on port 2375 and there is no way to configure it on the host as I couldnt find the docker config file in etc/default... I'm running Ubunti.

Any idea or suggestion?

Thanks a lot!

Retrieve container stdout

Hi!

I was wondering how exactly you're retrieving the Docker container stdout? Do you just read the log file? Because I can't really seem to find where you do that.

Thanks in advance!

glot-run clashed error

When I started up glot-run in docker,it clashed.Is there something wrong?

Exec: /glot/erts-8.1/bin/erlexec -noshell -noinput +Bd -boot /glot/releases/1.2.1/glot -mode embedded -boot_var ERTS_LIB_DIR /glot/lib -config /glot/releases/1.2.1/sys.config -args_file /glot/releases/1.2.1/vm.args -pa -- foreground
Root: /glot
/glot
05:57:06.492 [info] Application lager started on node '[email protected]'
05:57:06.493 [info] Application cowboy started on node '[email protected]'
05:57:06.493 [info] Application uuid started on node '[email protected]'
05:57:06.493 [info] Application ssl_verify_fun started on node '[email protected]'
05:57:06.493 [info] Application hackney started on node '[email protected]'
05:57:06.493 [error] CRASH REPORT Process <0.545.0> with 0 neighbours exited with reason: bad argument in call to erlang:list_to_atom(false) in config:environment/0 line 22 in application_master:init/4 line 134
05:57:06.494 [info] Application glot exited with reason: bad argument in call to erlang:list_to_atom(false) in config:environment/0 line 22
{"Kernel pid terminated",application_controller,"{application_start_failure,glot,{bad_return,{{glot_app,start,[normal,[]]},{'EXIT',{badarg,[{erlang,list_to_atom,[false],[]},{config,environment,0,[{file,"/glot-run/_build/default/lib/glot/src/config.erl"},{line,22}]},{glot_app,start,2,[{file,"/glot-run/_build/default/lib/glot/src/glot_app.erl"},{line,13}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,273}]}]}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,glot,{bad_return,{{glot_app,start,[normal,[]]},{'EXIT',{badarg,[{erlang,list_to_atom,[false],[]},{config,environment,0,[{file
Crash dump is being written to: erl_crash.dump...done

Unable to start docker container.

Hi, i am having some issues while setting up docker container using this repo. I'd really like to use this project. (I am new to both docker and erlang)

I cloned the repo and modified the devel.sh file with my own environment variables but I can't get the glot-run project working.

I build the docker image after modifying the evel.sh file, with the command docker build --tag=glotrun .

However, when I try to run it with the command docker run -it -p 8090:8090 glotrun, it fails with the following stack trace:

docker run -p 8090:8090 glotrun
Exec: /glot/erts-8.3/bin/erlexec -noshell -noinput +Bd -boot /glot/releases/1.2.1/glot -mode embedded -boot_var ERTS_LIB_DIR /glot/lib -config /glot/releases/1.2.1/sys.config -args_file /glot/releases/1.2.1/vm.args -pa -- foreground
Root: /glot
/glot
11:54:09.375 [info] Application lager started on node '[email protected]'
11:54:09.376 [info] Application cowboy started on node '[email protected]'
11:54:09.376 [info] Application uuid started on node '[email protected]'
11:54:09.376 [info] Application ssl_verify_fun started on node '[email protected]'
11:54:09.376 [info] Application hackney started on node '[email protected]'
11:54:09.377 [error] CRASH REPORT Process <0.560.0> with 0 neighbours exited with reason: bad argument in call to erlang:list_to_atom(false) in config:environment/0 line 22 in application_master:init/4 line 134
11:54:09.378 [info] Application glot exited with reason: bad argument in call to erlang:list_to_atom(false) in config:environment/0 line 22
Kernel pid terminated (application_controller) ({application_start_failure,glot,{bad_return,{{glot_app,start,[normal,[]]},{'EXIT',{badarg,[{erlang,list_to_atom,[false],[]},{config,environment,0,[{file

Crash dump is being written to: erl_crash.dump...{"Kernel pid terminated",application_controller,"{application_start_failure,glot,{bad_return,{{glot_app,start,[normal,[]]},{'EXIT',{badarg,[{erlang,list_to_atom,[false],[]},{config,environment,0,[{file,\"/glot-run/_build/default/lib/glot/src/config.erl\"},{line,22}]},{glot_app,start,2,[{file,\"/glot-run/_build/default/lib/glot/src/glot_app.erl\"},{line,13}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"}

Looking through the errors , it seems to be because my container's environment variables aren't properly set, but i did set all the values in devel.sh file and then built the container image.

I tried to pass the environment variables in command line and that container works but in that case what is the use of devel.sh file?

Please help.

Outdated Dockerfile?

When building the Dockerfile the build process exits with this message:

===> Verifying dependencies...
===> Analyzing applications...
===> Compiling glot
===> No releases have been specified in the system!

I also had to up the erlang version in the dockerfile from 22 => 23 since it was giving this message when building the dockerfile:

beam/beam_load.c(1876): Error loading module lager_transform:
  This BEAM file was compiled for a later version of the run-time system than 22.
  To fix this, please recompile this module with an 22 compiler.
  (Use of opcode 169; this emulator supports only up to 168.)

Is the dockerfile outdated?
I'd like to help with this but sadly i don't know erlang :(

[Request] Add link to my application

Hello @prasmussen , thank you for doing such an awesome job.

I have made a online compiler which aims to be used as a medium for online coding interviews in realtime, where while the candidate is coding, the interviewer can monitor the candidates code changes and other activites.
All of this is made possible because of glot api.
I would be very happy if you could mention my project in your readme.

Live - https://codingrunner.herokuapp.com/
Github - https://github.com/itaditya/Code-Runner/

Failed to boot glot

Failed to boot glot for reason {{shutdown,
{failed_to_start_child,
http_log_srv,
{{badmatch,{error,eacces}},
[{http_log_srv,init,1,
[{file,
"/home/ubuntu/glot-run/_build/default/lib/glot/src/logging/http_log_srv.erl"},
{line,25}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},
{line,328}]},
{proc_lib,
init_p_do_apply,3,
[{file,"proc_lib.erl"},
{line,240}]}]}}},
{glot_app,start,[normal,[]]}}

Missing auth token

curl -4 -sv -H -H 'Content-type: applicatiojson' -X POST -d '{"files": [{"name": "main.sh", "content": "echo "hello"\n"}]}' 54.152.33.106:8090/languages/bash/latest

  • Rebuilt URL to: Content-type: applicatiojson/
  • Could not resolve host: Content-type
  • Closing connection 0
  • Trying 54.152.33.106...
  • Connected to 54.152.33.106 (54.152.33.106) port 8090 (#1)

POST /languages/bash/latest HTTP/1.1
Host: 54.152.33.106:8090
User-Agent: curl/7.47.0
Accept: /
Content-Length: 63
Content-Type: application/x-www-form-urlencoded

  • upload completely sent off: 63 out of 63 bytes
    < HTTP/1.1 401 Unauthorized
    < server: Cowboy
    < date: Thu, 29 Nov 2018 12:32:52 GMT
    < content-length: 32
    < www-authenticate: Token
    <
  • Connection #1 to host 54.152.33.106 left intact

Build fails with error

Attempting to compile the program results in this error:
===> Invalid term in config file: {default_release,glot,"1.2.1"}
Removing that line from the config resolves the problem, and the program compiles like normal.

missing required Host header

I use glot-run.Send post request like this:
curl --request POST
--header 'Authorization: Token 0123456-789a-bcde-f012-3456789abcde'
--header 'Content-type: application/json'
--data '{"files": [{"name": "main.py", "content": "print(42)"}]}'
--url 'https://ip:port/languages/python/latest'
then the log shows:
10:31:35.028 [error] gen_fsm <0.636.0> in state recv_http terminated with reason: no function clause matching docker_attach:recv_http(<<"HTTP/1.1 400 Bad Request: missing required Host header\r\n">>, {state,#Port<0.975>,{<0.635.0>,#Ref<0.0.1.525>},[],118}) line 55 10:31:35.028 [error] CRASH REPORT Process <0.636.0> with 0 neighbours exited with reason: no function clause matching docker_attach:recv_http(<<"HTTP/1.1 400 Bad Request: missing required Host header\r\n">>, {state,#Port<0.975>,{<0.635.0>,#Ref<0.0.1.525>},[],118}) line 55 in gen_fsm:terminate/7 line 626 10:31:35.029 [error] Supervisor docker_attach_sup had child docker_attach started with {docker_attach,start_link,undefined} at <0.636.0> exit with reason no function clause matching docker_attach:recv_http(<<"HTTP/1.1 400 Bad Request: missing required Host header\r\n">>, {state,#Port<0.975>,{<0.635.0>,#Ref<0.0.1.525>},[],118}) line 55 in context child_terminated 10:31:35.030 [error] Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.635.0> exit with reason: [{reason,{{function_clause,[{docker_attach,recv_http,[<<"HTTP/1.1 400 Bad Request: missing required Host header\r\n">>,{state,#Port<0.975>,{<0.635.0>,#Ref<0.0.1.525>},[],118}],[{file,"/glot-run/_build/default/lib/glot/src/docker/docker_attach.erl"},{line,55}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,518}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]},{gen_fsm,sync_send_event,[<0.636.0>,{attach,<<"7bf9e233a6bd04261095f8cf30ed8b873ccbaf645712f48975d9f6ef0944333a">>},3600000]}}},{mfa,{language_run_resource,accept_post,2}},{stacktrace,[{gen_fsm,sync_send_event,3,[{file,"gen_fsm.erl"},{line,231}]},{docker,container_attach,1,[{file,"/glot-run/_build/default/lib/glot/src/docker/docker.erl"},{line,47}]},{language_run,run,3,[{file,"/glot-run/_build/default/lib/glot/src/models/language_run.erl"},{line,16}]},{language_run_resource,run_code,3,[{file,"/glot-run/_build/default/lib/glot/src/resources/language_run_resource.erl"},{line,97}]},{cowboy_rest,call,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,976}]},{cowboy_rest,process_content_type,3,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_rest.erl"},{line,777}]},{cowboy_protocol,execute,4,[{file,"/glot-run/_build/default/lib/cowboy/src/cowboy_protocol.erl"},{line,442}]}]},{req,[{socket,#Port<0.974>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.635.0>},{method,<<"POST">>},{version,'HTTP/1.1'},{peer,{{172,17,0,1},41216}},{host,<<"192.168.3.23">>},{host_info,undefined},{port,9090},{path,<<"/languages/python/latest">>},{path_info,undefined},{qs,<<>>},{qs_vals,undefined},{bindings,[{version,<<"latest">>},{name,<<"python">>}]},{headers,[{<<"user-agent">>,<<"curl/7.29.0">>},{<<"host">>,<<"192.168.3.23:9090">>},{<<"accept">>,<<"*/*">>},{<<"authorization">>,<<"Token d11088bc-a29d-4d49-a633-b1b1ae807064">>},{<<"content-type">>,<<"application/json">>},{<<"content-length">>,<<"56">>}]},{p_headers,[{<<"content-type">>,{<<"application">>,<<"json">>,[]}},{<<"if-modified-since">>,undefined},{<<"if-none-match">>,undefined},{<<"if-unmodified-since">>,undefined},{<<"if-match">>,undefined},{<<"accept">>,[{{<<"*">>,<<"*">>,[]},1000,[]}]}]},{cookies,undefined},{meta,[{media_type,{<<"application">>,<<"json">>,[]}},{charset,undefined}]},{body_state,waiting},{buffer,<<"{\"files\": [{\"name\": \"main.py\", \"content\": \"print(42)\"}]}">>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[{<<"content-type">>,[<<"application">>,<<"/">>,<<"json">>,<<>>]}]},{resp_body,<<>>},{onresponse,#Fun<http_util.log_response.4>}]},{state,{state,<<"python">>,<<"latest">>}}]

event log like this:
image

why?

Error using with Node.js

Whenever i tried to use Glot run api with Node.js I get following error as response when i logged the output :

{
  status: 200,
  statusText: 'OK',
  headers: {
    date: 'Fri, 07 Aug 2020 08:27:11 GMT',
    'content-type': 'application/json',
    'content-length': '40',
    connection: 'close',
    server: 'Cowboy'
  },
  config: {
    url: 'https://run.glot.io/languages/python/latest/',
    method: 'post',
    data: '{"files":[{"name":"main.py","content":"print(3)"}]}',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/json',
      'user-agent': 'node.js',
      Authorization: 'Token 53d1e48f-d493-4a09-ad74-77f6dcdaa55d',
      'Content-Length': 51
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function],
      abort: [Function],
      aborted: [Function],
      error: [Function],
      timeout: [Function],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 6,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: null,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'run.glot.io',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'run.glot.io',
      _readableState: [ReadableState],
      readable: true,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(asyncId)]: 24,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    connection: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: true,
      _SNICallback: null,
      servername: 'run.glot.io',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'run.glot.io',
      _readableState: [ReadableState],
      readable: true,
      _maxListeners: undefined,
      _writableState: [WritableState],
      writable: false,
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(asyncId)]: 24,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object]
    },
    _header: 'POST /languages/python/latest/ HTTP/1.1\r\n' +
      'Accept: application/json, text/plain, */*\r\n' +
      'Content-Type: application/json\r\n' +
      'user-agent: node.js\r\n' +
      'Authorization: Token 53d1e48f-d493-4a09-ad74-77f6dcdaa55d\r\n' +
      'Content-Length: 51\r\n' +
      'Host: run.glot.io\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    insecureHTTPParser: undefined,
    path: '/languages/python/latest/',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      readable: false,
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [TLSSocket],
      connection: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 200,
      statusMessage: 'OK',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular],
      responseUrl: 'https://run.glot.io/languages/python/latest/',
      redirects: [],
      [Symbol(kCapture)]: false
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    _redirectable: Writable {
      _writableState: [WritableState],
      writable: true,
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 51,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function],
      _currentRequest: [Circular],
      _currentUrl: 'https://run.glot.io/languages/python/latest/',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      authorization: [Array],
      'content-length': [Array],
      host: [Array]
    }
  },
  data: { stdout: '3\n', stderr: '', error: '' }
}
Converting circular structure to JSON
    --> starting at object with constructor 'ClientRequest'
    |     property 'socket' -> object with constructor 'TLSSocket'
    --- property '_httpMessage' closes the circle

Source Code

export const SubmitCode = async (req: Request, res: Response) => {
    try {
        const { sourceCode } = req.body;
        const uri = `https://run.glot.io/languages/python/latest/`;
        const axiosConfig = {
            headers: {
                'user-agent': 'node.js',
                Authorization: `Token ${process.env.GLOT_TOKEN}`,
                'Content-type': 'application/json',
            },
        };
        const attributes = {
            files: [
                {
                    name: `main.py`,
                    content: sourceCode,
                },
            ],
        };

        const output = await Axios.post(uri, attributes, axiosConfig);
   console.log(output);
        return res.status(200).send(output);
    } catch (err) {
        console.log(err.message);
        return res.status(500).json({ msg: 'Server error' });
    }
};

I send this message in req.body using Postman :

{
    "sourceCode" : "print(3)"
}

connect ECONNREFUSED 127.0.0.1:443

when i tried curl command for python is working fine...but i tried to integrate in node js it shows some
connection issue..
{ message: 'connect ECONNREFUSED 127.0.0.1:443',
stack: 'Error: connect ECONNREFUSED 127.0.0.1:443\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)',
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 44
@prasmussen @javierprovecho

404 page not found

when i run the curl command "curl -4 -sv -H "Authorization: Token some-token" -H 'Content-type: application/json' -X POST -d '{"files": [{"name": "main.sh", "content": "echo "hello"\n"}]}' localhost:80/languages/bash/latest"

  • Trying 127.0.0.1...
  • Connected to localhost (127.0.0.1) port 80 (#0)

POST /languages/bash/latest HTTP/1.1
Host: localhost
User-Agent: curl/7.47.0
Accept: /
Authorization: Token some-token
Content-type: application/json
Content-Length: 63

  • upload completely sent off: 63 out of 63 bytes
    < HTTP/1.1 404 Not Found
    < Content-Type: application/json
    < Date: Thu, 29 Nov 2018 09:10:22 GMT
    < Content-Length: 29
    <
    {"message":"page not found"}
    @prasmussen @javierprovecho

Failed to boot glot

Failed to boot glot for reason {bad_return,
{{glot_app,start,[normal,[]]},
{'EXIT',
{{badmatch,
{error,
{{shutdown,
{failed_to_start_child,
ranch_acceptors_sup,
{{badmatch,
{error,eaddrinuse}},
[{ranch_acceptors_sup,
init,1,
[{file,
"/home/ubuntu/glot-run/build/default/lib/ranch/src/ranch_acceptors_sup.erl"},
{line,30}]},
{supervisor,init,1,
[{file,
"supervisor.erl"},
{line,287}]},
{gen_server,
init_it,6,
[{file,
"gen_server.erl"},
{line,328}]},
{proc_lib,
init_p_do_apply,3,
[{file,
"proc_lib.erl"},
{line,240}]}]}}},
{child,undefined,
{ranch_listener_sup,
http},
{ranch_listener_sup,
start_link,
[http,100,ranch_tcp,
[{ip,{0,0,0,0}},
{port,8090}],
cowboy_protocol,
[{env,
[{dispatch,
[{'
',[],
[{[],[],
root_resource,
[]},
{[<<"admin">>],
[],
admin_root_resource,
[]},
{[<<"admin">>,
<<"users">>],
[],
admin_users_resource,
[]},
{[<<"admin">>,
<<"users">>,
id],
[],
admin_user_resource,
[]},
{[<<"admin">>,
<<"languages">>],
[],
admin_languages_resource,
[]},
{[<<"admin">>,
<<"languages">>,
id],
[],
admin_language_resource,
[]},
{[<<"images">>],
[],
images_resource,
[]},
{[<<"languages">>],
[],
languages_resource,
[]},
{[<<"languages">>,
name],
[],
language_resource,
[]},
{[<<"languages">>,
name,
version],
[],
language_run_resource,
[]}]}]}]},
{onrequest,
#Fun<http_util.log_request.1>},
{onresponse,
#Fun<http_util.log_response.4>}]]},
permanent,infinity,
supervisor,
[ranch_listener_sup]}}}},
[{glot_app,
start_http_server,0,
[{file,
"/home/ubuntu/glot-run/_build/default/lib/glot/src/glot_app.erl"},
{line,40}]},
{glot_app,start,2,
[{file,
"/home/ubuntu/glot-run/_build/default/lib/glot/src/glot_app.erl"},
{line,18}]},
{application_master,
start_it_old,4,
[{file,
"application_master.erl"},
{line,273}]}]}}}}

When running the ./glot foreground, it crashes.

root@CodeRunner:~/glot/glot-run/_build/default/rel/glot/bin# ./glot foreground
Exec: /root/glot/glot-run/_build/default/rel/glot/erts-7.2/bin/erlexec -noshell -noinput +Bd -boot /root/glot/glot-run/_build/default/rel/glot/releases/1.2.0/glot -mode embedded -config /root/glot/glot-run/_build/default/rel/glot/releases/1.2.0/sys.config -boot_var ERTS_LIB_DIR /root/glot/glot-run/_build/default/rel/glot/erts-7.2/../lib -args_file /root/glot/glot-run/_build/default/rel/glot/releases/1.2.0/vm.args -- foreground
Root: /root/glot/glot-run/_build/default/rel/glot
07:22:55.581 [info] Application lager started on node '[email protected]'
{"Kernel pid terminated",application_controller,"{application_start_failure,glot,{{shutdown,{failed_to_start_child,http_log_srv,{{badmatch,{error,enotdir}},[{http_log_srv,init,1,[{file,\"/root/glot/glot-run/_build/default/lib/glot/src/logging/http_log_srv.erl\"},{line,25}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,240}]}]}}},{glot_app,start,[normal,[]]}}}"}

Crash dump is being written to: erl_crash.dump...done
Kernel pid terminated (application_controller) ({application_start_failure,glot,{{shutdown,{failed_to_start_child,http_log_srv,{{badmatch,{error,enotdir}},[{http_log_srv,init,1,[{file,"/root/glot/gl

So sorry for disturbing, I'm new to erlang and trying to make this whole project work.

500 internal server error

can't run code in a docker container.
2017-06-08 03:37:22 =ERROR REPORT====
Error in process <0.682.0> on node '[email protected]' with exit value:
{[{reason,{badmatch,{error,econnrefused}}},{mfa,{language_run_resource,accept_post,2}},{stacktrace,[{docker,container_create,1,[{file,"/glot-run/_build/default/lib/glot/src/docker/docker.erl"
2017-06-08 03:37:22 =ERROR REPORT====
Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.682.0> exit with reason: {[{reason,{badmatch,{error,econnrefused}}},{mfa,{language_run_resource,acce
~

Getting 204 No content

Hi,

I tried to setup glot on aws server using both DOCKER_OPTIONS and socat for networking bridging. Javascript was working fine but for rest of the languages i was getting 204 No Content. No error is coming. If i am running languages images directly they are giving correct response.

echo '{ "language": "java", "files": [{ "name": "Main.java", "content": "class Main {\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n}" }] }' | docker run -i --rm glot/java:latest

For this i am getting correct response but getting 204 No Content in glot-run api response.

==> event.log <==
{"event":"Create container from image glot/java:latest","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:36Z"}
{"event":"Start container 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Attach container 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to ready state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Connect to 172.18.0.1:2375","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to recv_http state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to recv_http_header state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to attached state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Send payload to 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41 via <0.1196.0>","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Send payload","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Transition to recv_response state","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Socket closed","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Reply with data","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Stop normal","pid":"<0.1196.0>","timestamp":"2017-11-01T05:34:37Z"}
{"event":"Remove container 01dcd09812bced0c3ddcb0d1e5a1ed37b32c1f5f1c4c086c564fc84229a3df41","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:37Z"}

==> http.log <==
{"headers":{"host":"172.17.85.73:8073","connection":"keep-alive","content-length":"203","authorization":"Token 9hbI0QhxcmaGnh5SJds8","postman-token":"61fec6ec-9a6f-e950-802e-32068e036ab8","cache-control":"no-cache","origin":"chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36","content-type":"application/json","accept":"*/*","accept-encoding":"gzip, deflate","accept-language":"en-GB,en-US;q=0.8,en;q=0.6"},"method":"POST","path":"/languages/java/latest","peer":{"ip":"172.17.85.53","port":56656},"pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:36Z","type":"request"}
{"body":"{\n  \"language\": \"java\",\n  \"files\": [{\n    \"name\": \"Main.java\",\n    \"content\": \"class Main {\\n    public static void main(String[] args) {\\n        System.out.println(\\\"Hello World!\\\");\\n    }\\n}\"\n  }]\n}\n","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:36Z","type":"request_body"}

==> event.log <==
{"event":"Returning result","pid":"<0.1194.0>","timestamp":"2017-11-01T05:34:38Z"}

==> http.log <==
{"headers":{"server":"Cowboy","date":"Wed, 01 Nov 2017 05:34:38 GMT","content-length":"0","content-type":"application/json"},"pid":"<0.1194.0>","status":204,"timestamp":"2017-11-01T05:34:38Z","type":"response"}

I am using Ubuntu version 16.04 and Docker version 17.9 CE.

Any help appreciated. Thank you.

clang - 204 error

I get 204 error when POSTing a code to /languages/clang/latest

HTTP/1.1 204 No Content
server: Cowboy
date: Mon, 09 Jan 2017 22:27:00 GMT
content-length: 0
content-type: application/json

Works fine with /pythong/latest

glot/clang is installed, and the language is registered (and appears on /languages list)

Checked that glot/clang runs correctly on terminal.

Anyone had this? Known bug?

Shouldn't OPTIONS requests be allowed to be accpeted from the api?

When making api calls to https://run.glot.io or any other url that the api is hosted Options HTTP request are not allowed.

Since anyone with a token can make POST requests to the api (i.e Postman, Insomnia ,curl or any other http client) then should web apps be allowed to be able to send OfPTIONS requests (since these are pre flight request) that are followed by a POST request?

Is this the intended behavior regarding the api?

Can't run Docker container

Hi, the issue is probably on my part, but I'd really like to use this project and I can't seem to get it working. (I am new to both docker and erlang)

I've pulled the glot-code-runner images for python and java, and they seem to be working. If I run the container with docker run -it glot/python and paste {"language": "python", "files": [{"name": "main.py", "content": "print(42)"}]} into stdin, I get the correct JSON response.

However, I can't get the glot-run project working. I tried editing the Dockerfile, to add those environment variables in it by adding lines ENV [variable name]=[value], for each of the environment variables. For example ENV API_ENVIRONMENT=production.

I then tried to build it, with the command docker build --tag=glotrun .

And also added the line DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock" to /etc/default/docker

However, when I tried running it with the command docker run -it -p 8090:8090 glotrun, it fails with the following stack trace:

ubuntu@XXXXXXX:~/glot-run$ docker run -it -p 8090:8090 glotrun
Exec: /glot/erts-7.3.1/bin/erlexec -noshell -noinput +Bd -boot /glot/releases/1.2.0/glot -mode embedded -config /glot/releases/1.2.0/sys.config -boot_var ERTS_LIB_DIR /glot/erts-7.3.1/../lib -args_file /glot/releases/1.2.0/vm.args -- foreground
Root: /glot
17:08:41.927 [info] Application lager started on node '[email protected]'
17:08:41.928 [error] CRASH REPORT Process <0.512.0> with 0 neighbours exited with reason: bad argument in call to erlang:list_to_integer(false) in config:http_listen_port/0 line 37 in application_master:init/4 line 134
17:08:41.930 [info] Application glot exited with reason: bad argument in call to erlang:list_to_integer(false) in config:http_listen_port/0 line 37
{"Kernel pid terminated",application_controller,"{application_start_failure,glot,{bad_return,{{glot_app,start,[normal,[]]},{'EXIT',{badarg,[{erlang,list_to_integer,[false],[]},{config,http_listen_port,0,[{file,\"/glot-run/_build/default/lib/glot/src/config.erl\"},{line,37}]},{glot_app,start_http_server,0,[{file,\"/glot-run/_build/default/lib/glot/src/glot_app.erl\"},{line,43}]},{glot_app,start,2,[{file,\"/glot-run/_build/default/lib/glot/src/glot_app.erl\"},{line,18}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"}

Crash dump is being written to: erl_crash.dump...done
Kernel pid terminated (application_controller) ({application_start_failure,glot,{bad_return,{{glot_app,start,[normal,[]]},{'EXIT',{badarg,[{erlang,list_to_integer,[false],[]},{config,http_listen_por

I don't really know what this means and would greatly appreciate the help. Please let me know if there's any other info I should provide

EDIT: Looking through the code, it seems to be because my container's environment variables aren't properly set, so its failing on the line list_to_integer(os:getenv("API_HTTP_LISTEN_PORT")). . but I added them to the Dockerfile.. so I'm not sure what's wrong

CORS issue

Hi I'm unable to make an AJAX request to glot.io. I keep getting this error.

Failed to load https://run.glot.io/languages/python/latest: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 405.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.