File size: 483 Bytes
b5b4a38
 
 
a4aa491
b5b4a38
 
 
 
 
 
eec3b88
 
 
b5b4a38
fae8f77
dfd3544
b5b4a38
eec3b88
b5b4a38
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

import (
	"github.com/Jensen-holm/ml-from-scratch/nn"
	"github.com/gofiber/fiber/v2"
)

func main() {
	app := fiber.New()

	// eventually we might want to add a key to this endpoint
	// that we will be able to validate.
	app.Post("/neural-network", func(c *fiber.Ctx) error {

		_, err := nn.NewNN(c)
		if err != nil {
			return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
				"error": err,
			})
		}

		return c.SendString("No error")
	})

	app.Listen(":3000")
}