feat: CLI + local linking (#313)

* fix: allow local cmd without exiting process

* fix: improves cli experience

* fix: allow running link with --develop

* test: adds snapshot testing of error logs

* chore: cleanup

* feat(medusa-cli): new command (#320)

* adds: new command

* fix: creates  command for easy project setup

* chore: deps

* chore: deps

* fix: loggin

* fix: logging

* fix: adds cli as dependency in core

* fix: consolidates CLI in medusa

* fix: use project deps medusa bin

* fix: use project deps medusa bin

* fix: use cli path

* fix: new command setup db + env vars

* fix: new command with db seed

* fix: cleanup
This commit is contained in:
Sebastian Rindom
2021-07-26 10:09:55 +02:00
committed by GitHub
parent 804a2f6ed9
commit f4a7138a58
22 changed files with 2284 additions and 159 deletions
+2 -1
View File
@@ -11,11 +11,12 @@ export default async function({ port, directory }) {
const app = express()
const { dbConnection } = await loaders({ directory, expressApp: app })
const serverActivity = Logger.activity(`Creating server`)
const server = app.listen(port, err => {
if (err) {
return
}
Logger.info(`Server is ready on port: ${port}!`)
Logger.success(serverActivity, `Server is ready on port: ${port}`)
})
return { dbConnection, server }