Planets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
475 B

import os
from flask import Flask, render_template
from planets import createRandomPlanet
app = Flask(__name__)
IMG_FOLDER = os.path.join('static', 'IMG')
app.config['UPLOAD_FOLDER'] = IMG_FOLDER
@app.route('/<seed>')
def hello(seed):
print(seed)
createRandomPlanet(seed)
planet = os.path.join(app.config['UPLOAD_FOLDER'], 'planet.png')
return render_template('hello.html', planet=planet)
if __name__=='__main__':
app.run(debug=True, host='0.0.0.0')